; LLVM IR from moarseniy/CudaFEMproject :: FEMproject/thirdparty/segyio/src/SegyOut.ll (ZN8CSegyOut20writeSEGYTraceHeaderEv)

; 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.CSegyIO = 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, [6 x 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::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.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }

@_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count = external hidden global i32, align 4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8CSegyOut20writeSEGYTraceHeaderEv(ptr noundef nonnull align 8 dereferenceable(1547) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i16, align 2
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca [4 x i8], align 1
  %8 = alloca [2 x i8], align 1
  %9 = alloca [240 x i8], align 16
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %38 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %39 = load i32, ptr @_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count, align 4, !tbaa !9
  %40 = mul nsw i32 %39, 71
  %41 = sext i32 %40 to i64
  store i64 %41, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 240, ptr %9) #5
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 240, i1 false)
  br label %42

42:                                               ; preds = %60, %1
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = icmp slt i32 %43, 7
  br i1 %44, label %45, label %63

45:                                               ; preds = %42
  %46 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  %47 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 10
  %48 = load ptr, ptr %47, align 8, !tbaa !13
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = load i64, ptr %6, align 8, !tbaa !11
  %52 = add nsw i64 %50, %51
  %53 = getelementptr inbounds i32, ptr %48, i64 %52
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %46, ptr align 4 %53, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %54 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  store ptr %54, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %55 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  store ptr %55, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %56 = load i64, ptr %5, align 8, !tbaa !11
  %57 = trunc i64 %56 to i32
  store i32 %57, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 4, ptr %13, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %38, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %58 = load i64, ptr %5, align 8, !tbaa !11
  %59 = add nsw i64 %58, 4
  store i64 %59, ptr %5, align 8, !tbaa !11
  br label %60

60:                                               ; preds = %45
  %61 = load i32, ptr %3, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %3, align 4, !tbaa !9
  br label %42, !llvm.loop !29

63:                                               ; preds = %42
  br label %64

64:                                               ; preds = %84, %63
  %65 = load i32, ptr %3, align 4, !tbaa !9
  %66 = icmp slt i32 %65, 11
  br i1 %66, label %67, label %87

67:                                               ; preds = %64
  %68 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 10
  %69 = load ptr, ptr %68, align 8, !tbaa !13
  %70 = load i32, ptr %3, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = load i64, ptr %6, align 8, !tbaa !11
  %73 = add nsw i64 %71, %72
  %74 = getelementptr inbounds i32, ptr %69, i64 %73
  %75 = load i32, ptr %74, align 4, !tbaa !9
  %76 = trunc i32 %75 to i16
  store i16 %76, ptr %4, align 2, !tbaa !31
  %77 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %77, ptr align 2 %4, i64 2, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %78 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  store ptr %78, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %79 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  store ptr %79, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %80 = load i64, ptr %5, align 8, !tbaa !11
  %81 = trunc i64 %80 to i32
  store i32 %81, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 2, ptr %17, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %38, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %82 = load i64, ptr %5, align 8, !tbaa !11
  %83 = add nsw i64 %82, 2
  store i64 %83, ptr %5, align 8, !tbaa !11
  br label %84

84:                                               ; preds = %67
  %85 = load i32, ptr %3, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %3, align 4, !tbaa !9
  br label %64, !llvm.loop !33

87:                                               ; preds = %64
  br label %88

88:                                               ; preds = %106, %87
  %89 = load i32, ptr %3, align 4, !tbaa !9
  %90 = icmp slt i32 %89, 19
  br i1 %90, label %91, label %109

91:                                               ; preds = %88
  %92 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  %93 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 10
  %94 = load ptr, ptr %93, align 8, !tbaa !13
  %95 = load i32, ptr %3, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = load i64, ptr %6, align 8, !tbaa !11
  %98 = add nsw i64 %96, %97
  %99 = getelementptr inbounds i32, ptr %94, i64 %98
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %92, ptr align 4 %99, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %100 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  store ptr %100, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %101 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  store ptr %101, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %102 = load i64, ptr %5, align 8, !tbaa !11
  %103 = trunc i64 %102 to i32
  store i32 %103, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 4, ptr %21, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %38, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) %21)
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %104 = load i64, ptr %5, align 8, !tbaa !11
  %105 = add nsw i64 %104, 4
  store i64 %105, ptr %5, align 8, !tbaa !11
  br label %106

106:                                              ; preds = %91
  %107 = load i32, ptr %3, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %3, align 4, !tbaa !9
  br label %88, !llvm.loop !34

109:                                              ; preds = %88
  br label %110

110:                                              ; preds = %130, %109
  %111 = load i32, ptr %3, align 4, !tbaa !9
  %112 = icmp slt i32 %111, 21
  br i1 %112, label %113, label %133

113:                                              ; preds = %110
  %114 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 10
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  %116 = load i32, ptr %3, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = load i64, ptr %6, align 8, !tbaa !11
  %119 = add nsw i64 %117, %118
  %120 = getelementptr inbounds i32, ptr %115, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = trunc i32 %121 to i16
  store i16 %122, ptr %4, align 2, !tbaa !31
  %123 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %123, ptr align 2 %4, i64 2, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %124 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  store ptr %124, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %125 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  store ptr %125, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %126 = load i64, ptr %5, align 8, !tbaa !11
  %127 = trunc i64 %126 to i32
  store i32 %127, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 2, ptr %25, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %38, ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 4 dereferenceable(4) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  %128 = load i64, ptr %5, align 8, !tbaa !11
  %129 = add nsw i64 %128, 2
  store i64 %129, ptr %5, align 8, !tbaa !11
  br label %130

130:                                              ; preds = %113
  %131 = load i32, ptr %3, align 4, !tbaa !9
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %3, align 4, !tbaa !9
  br label %110, !llvm.loop !35

133:                                              ; preds = %110
  br label %134

134:                                              ; preds = %152, %133
  %135 = load i32, ptr %3, align 4, !tbaa !9
  %136 = icmp slt i32 %135, 25
  br i1 %136, label %137, label %155

137:                                              ; preds = %134
  %138 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  %139 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 10
  %140 = load ptr, ptr %139, align 8, !tbaa !13
  %141 = load i32, ptr %3, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = load i64, ptr %6, align 8, !tbaa !11
  %144 = add nsw i64 %142, %143
  %145 = getelementptr inbounds i32, ptr %140, i64 %144
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %138, ptr align 4 %145, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %146 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  store ptr %146, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %147 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  store ptr %147, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %148 = load i64, ptr %5, align 8, !tbaa !11
  %149 = trunc i64 %148 to i32
  store i32 %149, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  store i32 4, ptr %29, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %38, ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %29)
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  %150 = load i64, ptr %5, align 8, !tbaa !11
  %151 = add nsw i64 %150, 4
  store i64 %151, ptr %5, align 8, !tbaa !11
  br label %152

152:                                              ; preds = %137
  %153 = load i32, ptr %3, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %3, align 4, !tbaa !9
  br label %134, !llvm.loop !36

155:                                              ; preds = %134
  br label %156

156:                                              ; preds = %176, %155
  %157 = load i32, ptr %3, align 4, !tbaa !9
  %158 = icmp slt i32 %157, 67
  br i1 %158, label %159, label %179

159:                                              ; preds = %156
  %160 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 10
  %161 = load ptr, ptr %160, align 8, !tbaa !13
  %162 = load i32, ptr %3, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = load i64, ptr %6, align 8, !tbaa !11
  %165 = add nsw i64 %163, %164
  %166 = getelementptr inbounds i32, ptr %161, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = trunc i32 %167 to i16
  store i16 %168, ptr %4, align 2, !tbaa !31
  %169 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %169, ptr align 2 %4, i64 2, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %170 = getelementptr inbounds [2 x i8], ptr %8, i64 0, i64 0
  store ptr %170, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  %171 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  store ptr %171, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %172 = load i64, ptr %5, align 8, !tbaa !11
  %173 = trunc i64 %172 to i32
  store i32 %173, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  store i32 2, ptr %33, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %38, ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  %174 = load i64, ptr %5, align 8, !tbaa !11
  %175 = add nsw i64 %174, 2
  store i64 %175, ptr %5, align 8, !tbaa !11
  br label %176

176:                                              ; preds = %159
  %177 = load i32, ptr %3, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %3, align 4, !tbaa !9
  br label %156, !llvm.loop !37

179:                                              ; preds = %156
  br label %180

180:                                              ; preds = %198, %179
  %181 = load i32, ptr %3, align 4, !tbaa !9
  %182 = icmp slt i32 %181, 71
  br i1 %182, label %183, label %201

183:                                              ; preds = %180
  %184 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  %185 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 10
  %186 = load ptr, ptr %185, align 8, !tbaa !13
  %187 = load i32, ptr %3, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = load i64, ptr %6, align 8, !tbaa !11
  %190 = add nsw i64 %188, %189
  %191 = getelementptr inbounds i32, ptr %186, i64 %190
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %184, ptr align 4 %191, i64 4, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #5
  %192 = getelementptr inbounds [4 x i8], ptr %7, i64 0, i64 0
  store ptr %192, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #5
  %193 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  store ptr %193, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  %194 = load i64, ptr %5, align 8, !tbaa !11
  %195 = trunc i64 %194 to i32
  store i32 %195, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #5
  store i32 4, ptr %37, align 4, !tbaa !9
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %38, ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 4 dereferenceable(4) %36, ptr noundef nonnull align 4 dereferenceable(4) %37)
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #5
  %196 = load i64, ptr %5, align 8, !tbaa !11
  %197 = add nsw i64 %196, 4
  store i64 %197, ptr %5, align 8, !tbaa !11
  br label %198

198:                                              ; preds = %183
  %199 = load i32, ptr %3, align 4, !tbaa !9
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %3, align 4, !tbaa !9
  br label %180, !llvm.loop !38

201:                                              ; preds = %180
  %202 = getelementptr inbounds %class.CSegyIO, ptr %38, i32 0, i32 13
  %203 = getelementptr inbounds [240 x i8], ptr %9, i64 0, i64 0
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef %203, i64 noundef 240)
  %205 = load i32, ptr @_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count, align 4, !tbaa !9
  %206 = add nsw i32 %205, 1
  store i32 %206, ptr @_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 240, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 432}
!14 = !{!"_ZTS7CSegyIO", !10, i64 8, !10, i64 12, !10, i64 16, !15, i64 20, !10, i64 24, !7, i64 28, !7, i64 312, !6, i64 424, !6, i64 432, !12, i64 440, !16, i64 448, !25, i64 968, !27, i64 1480, !27, i64 1512, !22, i64 1544, !22, i64 1545}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTSSt14basic_ifstreamIcSt11char_traitsIcEE", !17, i64 0, !18, i64 16}
!17 = !{!"_ZTSSi", !12, i64 8}
!18 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !19, i64 0, !7, i64 64, !21, i64 104, !23, i64 120, !24, i64 124, !24, i64 132, !24, i64 140, !6, i64 152, !12, i64 160, !22, i64 168, !22, i64 169, !22, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !22, i64 192, !6, i64 200, !6, i64 208, !12, i64 216, !6, i64 224, !6, i64 232}
!19 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !20, i64 56}
!20 = !{!"_ZTSSt6locale", !6, i64 0}
!21 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !22, i64 8}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!24 = !{!"_ZTS11__mbstate_t", !10, i64 0, !7, i64 4}
!25 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !26, i64 0, !18, i64 8}
!26 = !{!"_ZTSSo"}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !28, i64 0, !12, i64 8, !7, i64 16}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!32, !32, i64 0}
!32 = !{!"short", !7, i64 0}
!33 = distinct !{!33, !30}
!34 = distinct !{!34, !30}
!35 = distinct !{!35, !30}
!36 = distinct !{!36, !30}
!37 = distinct !{!37, !30}
!38 = distinct !{!38, !30}


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

@_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count = external hidden local_unnamed_addr global i32, align 4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8CSegyOut20writeSEGYTraceHeaderEv(ptr noundef nonnull align 8 dereferenceable(1547) %0) local_unnamed_addr #1 align 2 {
.lr.ph78:
  %1 = alloca [4 x i8], align 4
  %2 = alloca [2 x i8], align 2
  %3 = alloca [240 x i8], align 16
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = load i32, ptr @_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count, align 4, !tbaa !5
  %33 = mul nsw i32 %32, 71
  %34 = sext i32 %33 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %3) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(240) %3, i8 0, i64 240, i1 false)
  %35 = getelementptr inbounds i8, ptr %0, i64 432
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = getelementptr i32, ptr %36, i64 %34
  %38 = load i32, ptr %37, align 4
  store i32 %38, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %1, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %3, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %39 = load ptr, ptr %35, align 8, !tbaa !9
  %40 = getelementptr i8, ptr %39, i64 4
  %41 = getelementptr i32, ptr %40, i64 %34
  %42 = load i32, ptr %41, align 4
  store i32 %42, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %1, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %3, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 4, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %43 = load ptr, ptr %35, align 8, !tbaa !9
  %44 = getelementptr i8, ptr %43, i64 8
  %45 = getelementptr i32, ptr %44, i64 %34
  %46 = load i32, ptr %45, align 4
  store i32 %46, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %1, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %3, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 8, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %47 = load ptr, ptr %35, align 8, !tbaa !9
  %48 = getelementptr i8, ptr %47, i64 12
  %49 = getelementptr i32, ptr %48, i64 %34
  %50 = load i32, ptr %49, align 4
  store i32 %50, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %1, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %3, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 12, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %51 = load ptr, ptr %35, align 8, !tbaa !9
  %52 = getelementptr i8, ptr %51, i64 16
  %53 = getelementptr i32, ptr %52, i64 %34
  %54 = load i32, ptr %53, align 4
  store i32 %54, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %1, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %3, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 16, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %55 = load ptr, ptr %35, align 8, !tbaa !9
  %56 = getelementptr i8, ptr %55, i64 20
  %57 = getelementptr i32, ptr %56, i64 %34
  %58 = load i32, ptr %57, align 4
  store i32 %58, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %1, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %3, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 20, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %59 = load ptr, ptr %35, align 8, !tbaa !9
  %60 = getelementptr i8, ptr %59, i64 24
  %61 = getelementptr i32, ptr %60, i64 %34
  %62 = load i32, ptr %61, align 4
  store i32 %62, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr %1, ptr %4, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store ptr %3, ptr %5, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 24, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 4, ptr %7, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %63 = load ptr, ptr %35, align 8, !tbaa !9
  %64 = getelementptr i8, ptr %63, i64 28
  %65 = getelementptr i32, ptr %64, i64 %34
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = trunc i32 %66 to i16
  store i16 %67, ptr %2, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  store ptr %2, ptr %8, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr %3, ptr %9, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 28, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 2, ptr %11, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %68 = load ptr, ptr %35, align 8, !tbaa !9
  %69 = getelementptr i8, ptr %68, i64 32
  %70 = getelementptr i32, ptr %69, i64 %34
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = trunc i32 %71 to i16
  store i16 %72, ptr %2, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  store ptr %2, ptr %8, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr %3, ptr %9, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 30, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 2, ptr %11, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %73 = load ptr, ptr %35, align 8, !tbaa !9
  %74 = getelementptr i8, ptr %73, i64 36
  %75 = getelementptr i32, ptr %74, i64 %34
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = trunc i32 %76 to i16
  store i16 %77, ptr %2, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  store ptr %2, ptr %8, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr %3, ptr %9, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 32, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 2, ptr %11, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %78 = load ptr, ptr %35, align 8, !tbaa !9
  %79 = getelementptr i8, ptr %78, i64 40
  %80 = getelementptr i32, ptr %79, i64 %34
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = trunc i32 %81 to i16
  store i16 %82, ptr %2, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  store ptr %2, ptr %8, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr %3, ptr %9, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 34, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  store i32 2, ptr %11, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  %83 = load ptr, ptr %35, align 8, !tbaa !9
  %84 = getelementptr i8, ptr %83, i64 44
  %85 = getelementptr i32, ptr %84, i64 %34
  %86 = load i32, ptr %85, align 4
  store i32 %86, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 36, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %87 = load ptr, ptr %35, align 8, !tbaa !9
  %88 = getelementptr i8, ptr %87, i64 48
  %89 = getelementptr i32, ptr %88, i64 %34
  %90 = load i32, ptr %89, align 4
  store i32 %90, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 40, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %91 = load ptr, ptr %35, align 8, !tbaa !9
  %92 = getelementptr i8, ptr %91, i64 52
  %93 = getelementptr i32, ptr %92, i64 %34
  %94 = load i32, ptr %93, align 4
  store i32 %94, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 44, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %95 = load ptr, ptr %35, align 8, !tbaa !9
  %96 = getelementptr i8, ptr %95, i64 56
  %97 = getelementptr i32, ptr %96, i64 %34
  %98 = load i32, ptr %97, align 4
  store i32 %98, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 48, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %99 = load ptr, ptr %35, align 8, !tbaa !9
  %100 = getelementptr i8, ptr %99, i64 60
  %101 = getelementptr i32, ptr %100, i64 %34
  %102 = load i32, ptr %101, align 4
  store i32 %102, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 52, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %103 = load ptr, ptr %35, align 8, !tbaa !9
  %104 = getelementptr i8, ptr %103, i64 64
  %105 = getelementptr i32, ptr %104, i64 %34
  %106 = load i32, ptr %105, align 4
  store i32 %106, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 56, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %107 = load ptr, ptr %35, align 8, !tbaa !9
  %108 = getelementptr i8, ptr %107, i64 68
  %109 = getelementptr i32, ptr %108, i64 %34
  %110 = load i32, ptr %109, align 4
  store i32 %110, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 60, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %111 = load ptr, ptr %35, align 8, !tbaa !9
  %112 = getelementptr i8, ptr %111, i64 72
  %113 = getelementptr i32, ptr %112, i64 %34
  %114 = load i32, ptr %113, align 4
  store i32 %114, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store ptr %1, ptr %12, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  store ptr %3, ptr %13, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #4
  store i32 64, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #4
  store i32 4, ptr %15, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  %115 = load ptr, ptr %35, align 8, !tbaa !9
  %116 = getelementptr i8, ptr %115, i64 76
  %117 = getelementptr i32, ptr %116, i64 %34
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = trunc i32 %118 to i16
  store i16 %119, ptr %2, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  store ptr %2, ptr %16, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  store ptr %3, ptr %17, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #4
  store i32 68, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #4
  store i32 2, ptr %19, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  %120 = load ptr, ptr %35, align 8, !tbaa !9
  %121 = getelementptr i8, ptr %120, i64 80
  %122 = getelementptr i32, ptr %121, i64 %34
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = trunc i32 %123 to i16
  store i16 %124, ptr %2, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #4
  store ptr %2, ptr %16, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #4
  store ptr %3, ptr %17, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #4
  store i32 70, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #4
  store i32 2, ptr %19, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #4
  %125 = load ptr, ptr %35, align 8, !tbaa !9
  %126 = getelementptr i8, ptr %125, i64 84
  %127 = getelementptr i32, ptr %126, i64 %34
  %128 = load i32, ptr %127, align 4
  store i32 %128, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  store ptr %1, ptr %20, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  store ptr %3, ptr %21, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #4
  store i32 72, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #4
  store i32 4, ptr %23, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  %129 = load ptr, ptr %35, align 8, !tbaa !9
  %130 = getelementptr i8, ptr %129, i64 88
  %131 = getelementptr i32, ptr %130, i64 %34
  %132 = load i32, ptr %131, align 4
  store i32 %132, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  store ptr %1, ptr %20, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  store ptr %3, ptr %21, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #4
  store i32 76, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #4
  store i32 4, ptr %23, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  %133 = load ptr, ptr %35, align 8, !tbaa !9
  %134 = getelementptr i8, ptr %133, i64 92
  %135 = getelementptr i32, ptr %134, i64 %34
  %136 = load i32, ptr %135, align 4
  store i32 %136, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  store ptr %1, ptr %20, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  store ptr %3, ptr %21, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #4
  store i32 80, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #4
  store i32 4, ptr %23, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  %137 = load ptr, ptr %35, align 8, !tbaa !9
  %138 = getelementptr i8, ptr %137, i64 96
  %139 = getelementptr i32, ptr %138, i64 %34
  %140 = load i32, ptr %139, align 4
  store i32 %140, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #4
  store ptr %1, ptr %20, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #4
  store ptr %3, ptr %21, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %22) #4
  store i32 84, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #4
  store i32 4, ptr %23, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #4
  br label %141

141:                                              ; preds = %.lr.ph78, %141
  %indvars.iv = phi i64 [ 25, %.lr.ph78 ], [ %indvars.iv.next, %141 ]
  %.54976 = phi i64 [ 88, %.lr.ph78 ], [ %148, %141 ]
  %142 = load ptr, ptr %35, align 8, !tbaa !9
  %143 = getelementptr i32, ptr %142, i64 %indvars.iv
  %144 = getelementptr i32, ptr %143, i64 %34
  %145 = load i32, ptr %144, align 4, !tbaa !5
  %146 = trunc i32 %145 to i16
  store i16 %146, ptr %2, align 2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #4
  store ptr %2, ptr %24, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #4
  store ptr %3, ptr %25, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #4
  %147 = trunc i64 %.54976 to i32
  store i32 %147, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #4
  store i32 2, ptr %27, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %27)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #4
  %148 = add nuw nsw i64 %.54976, 2
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 67
  br i1 %exitcond.not, label %._crit_edge, label %141, !llvm.loop !28

._crit_edge:                                      ; preds = %141
  %149 = load ptr, ptr %35, align 8, !tbaa !9
  %150 = getelementptr i8, ptr %149, i64 268
  %151 = getelementptr i32, ptr %150, i64 %34
  %152 = load i32, ptr %151, align 4
  store i32 %152, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #4
  store ptr %1, ptr %28, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #4
  store ptr %3, ptr %29, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #4
  %153 = trunc i64 %148 to i32
  store i32 %153, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #4
  store i32 4, ptr %31, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #4
  %154 = load ptr, ptr %35, align 8, !tbaa !9
  %155 = getelementptr i8, ptr %154, i64 272
  %156 = getelementptr i32, ptr %155, i64 %34
  %157 = load i32, ptr %156, align 4
  store i32 %157, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #4
  store ptr %1, ptr %28, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #4
  store ptr %3, ptr %29, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #4
  %158 = trunc i64 %.54976 to i32
  %159 = add i32 %158, 6
  store i32 %159, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #4
  store i32 4, ptr %31, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #4
  %160 = load ptr, ptr %35, align 8, !tbaa !9
  %161 = getelementptr i8, ptr %160, i64 276
  %162 = getelementptr i32, ptr %161, i64 %34
  %163 = load i32, ptr %162, align 4
  store i32 %163, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #4
  store ptr %1, ptr %28, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #4
  store ptr %3, ptr %29, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #4
  %164 = trunc i64 %.54976 to i32
  %165 = add i32 %164, 10
  store i32 %165, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #4
  store i32 4, ptr %31, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #4
  %166 = load ptr, ptr %35, align 8, !tbaa !9
  %167 = getelementptr i8, ptr %166, i64 280
  %168 = getelementptr i32, ptr %167, i64 %34
  %169 = load i32, ptr %168, align 4
  store i32 %169, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %28) #4
  store ptr %1, ptr %28, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %29) #4
  store ptr %3, ptr %29, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %30) #4
  %170 = trunc i64 %.54976 to i32
  %171 = add i32 %170, 14
  store i32 %171, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %31) #4
  store i32 4, ptr %31, align 4, !tbaa !5
  call void @_ZN8CSegyOut9setBufferERKPcS2_RKiS4_(ptr noundef nonnull align 8 dereferenceable(1547) %0, ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %31) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %30) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %28) #4
  %172 = getelementptr inbounds i8, ptr %0, i64 968
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8) %172, ptr noundef nonnull %3, i64 noundef 240)
  %174 = load i32, ptr @_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count, align 4, !tbaa !5
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr @_ZZN8CSegyOut20writeSEGYTraceHeaderEvE5count, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSo5writeEPKcl(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) local_unnamed_addr #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 432}
!10 = !{!"_ZTS7CSegyIO", !6, i64 8, !6, i64 12, !6, i64 16, !11, i64 20, !6, i64 24, !7, i64 28, !7, i64 312, !12, i64 424, !12, i64 432, !13, i64 440, !14, i64 448, !23, i64 968, !25, i64 1480, !25, i64 1512, !20, i64 1544, !20, i64 1545}
!11 = !{!"float", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt14basic_ifstreamIcSt11char_traitsIcEE", !15, i64 0, !16, i64 16}
!15 = !{!"_ZTSSi", !13, i64 8}
!16 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !17, i64 0, !7, i64 64, !19, i64 104, !21, i64 120, !22, i64 124, !22, i64 132, !22, i64 140, !12, i64 152, !13, i64 160, !20, i64 168, !20, i64 169, !20, i64 170, !7, i64 171, !12, i64 176, !12, i64 184, !20, i64 192, !12, i64 200, !12, i64 208, !13, i64 216, !12, i64 224, !12, i64 232}
!17 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !18, i64 56}
!18 = !{!"_ZTSSt6locale", !12, i64 0}
!19 = !{!"_ZTSSt12__basic_fileIcE", !12, i64 0, !20, i64 8}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!22 = !{!"_ZTS11__mbstate_t", !6, i64 0, !7, i64 4}
!23 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !24, i64 0, !16, i64 8}
!24 = !{!"_ZTSSo"}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !13, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!27 = !{!12, !12, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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