; LLVM IR from nbosb/simdal :: src/simdal/csv (csv_file)

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

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

@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #1

declare ptr @__cxa_begin_catch(ptr)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6simdal8csv_file9read_lineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(576), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6simdal8csv_file16get_line_elementEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_c(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6simdal8csv_file9get_id_ofERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjRbRS6_Rjj(ptr noundef nonnull align 8 dereferenceable(576) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2, i32 noundef %3, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %7) #3 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca i1, align 1
  %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 ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i32 %2, ptr %12, align 4, !tbaa !9
  store i32 %3, ptr %13, align 4, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store i32 %7, ptr %17, align 4, !tbaa !9
  %25 = load ptr, ptr %10, align 8
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  store i8 0, ptr %26, align 1, !tbaa !11
  %27 = load ptr, ptr %15, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.4)
  %29 = call noundef zeroext i1 @_ZN6simdal8csv_file14reset_read_posEv(ptr noundef nonnull align 8 dereferenceable(576) %25)
  br i1 %29, label %31, label %30

30:                                               ; preds = %8
  store i1 false, ptr %9, align 1
  br label %140

31:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @.str.4)
  br label %34

34:                                               ; preds = %42, %31
  %35 = load i32, ptr %18, align 4, !tbaa !9
  %36 = load i32, ptr %17, align 4, !tbaa !9
  %37 = icmp ult i32 %35, %36
  br i1 %37, label %38, label %45

38:                                               ; preds = %34
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZN6simdal8csv_file9read_lineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(576) %25, ptr noundef nonnull align 8 dereferenceable(32) %39)
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i1 false, ptr %9, align 1
  store i32 1, ptr %19, align 4
  br label %139

42:                                               ; preds = %38
  %43 = load i32, ptr %18, align 4, !tbaa !9
  %44 = add i32 %43, 1
  store i32 %44, ptr %18, align 4, !tbaa !9
  br label %34, !llvm.loop !13

45:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %115, %66, %45
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = load i8, ptr %47, align 1, !tbaa !11, !range !15, !noundef !16
  %49 = trunc i8 %48 to i1
  br i1 %49, label %61, label %50

50:                                               ; preds = %46
  %51 = load ptr, ptr %15, align 8, !tbaa !5
  %52 = invoke noundef zeroext i1 @_ZN6simdal8csv_file9read_lineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(576) %25, ptr noundef nonnull align 8 dereferenceable(32) %51)
          to label %53 unwind label %67

53:                                               ; preds = %50
  br i1 %52, label %54, label %61

54:                                               ; preds = %53
  %55 = load i32, ptr %12, align 4, !tbaa !9
  %56 = load ptr, ptr %15, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.simdal::csv_file", ptr %25, i32 0, i32 3
  %58 = load i8, ptr %57, align 8, !tbaa !17
  %59 = invoke noundef zeroext i1 @_ZN6simdal8csv_file16get_line_elementEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_c(i32 noundef %55, ptr noundef nonnull align 8 dereferenceable(32) %56, ptr noundef nonnull align 8 dereferenceable(32) %20, i8 noundef signext %58)
          to label %60 unwind label %67

60:                                               ; preds = %54
  br label %61

61:                                               ; preds = %60, %53, %46
  %62 = phi i1 [ false, %53 ], [ false, %46 ], [ %59, %60 ]
  br i1 %62, label %63, label %118

63:                                               ; preds = %61
  %64 = load ptr, ptr %15, align 8, !tbaa !5
  %65 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %64) #6
  br i1 %65, label %66, label %71

66:                                               ; preds = %63
  br label %46, !llvm.loop !32

67:                                               ; preds = %130, %92, %71, %54, %50
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %23, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %24, align 4
  br label %138

71:                                               ; preds = %63
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.simdal::csv_file", ptr %25, i32 0, i32 3
  %75 = load i8, ptr %74, align 8, !tbaa !17
  %76 = invoke noundef zeroext i1 @_ZN6simdal8csv_file16get_line_elementEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_c(i32 noundef %72, ptr noundef nonnull align 8 dereferenceable(32) %73, ptr noundef nonnull align 8 dereferenceable(32) %21, i8 noundef signext %75)
          to label %77 unwind label %67

77:                                               ; preds = %71
  br i1 %76, label %79, label %78

78:                                               ; preds = %77
  store i1 false, ptr %9, align 1
  store i32 1, ptr %19, align 4
  br label %137

79:                                               ; preds = %77
  %80 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef null, i32 noundef 10)
          to label %81 unwind label %83

81:                                               ; preds = %79
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 %80, ptr %82, align 4, !tbaa !9
  br label %99

83:                                               ; preds = %79
  %84 = landingpad { ptr, i32 }
          catch ptr null
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %23, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %24, align 4
  br label %87

87:                                               ; preds = %83
  %88 = load ptr, ptr %23, align 8
  %89 = call ptr @__cxa_begin_catch(ptr %88) #6
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  %91 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %90, ptr noundef @.str.4)
          to label %92 unwind label %93

92:                                               ; preds = %87
  store i1 false, ptr %9, align 1
  store i32 1, ptr %19, align 4
  invoke void @__cxa_end_catch()
          to label %97 unwind label %67

93:                                               ; preds = %87
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %23, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %24, align 4
  invoke void @__cxa_end_catch()
          to label %98 unwind label %147

97:                                               ; preds = %92
  br label %137

98:                                               ; preds = %93
  br label %138

99:                                               ; preds = %81
  %100 = load ptr, ptr %16, align 8, !tbaa !5
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = load i32, ptr %22, align 4, !tbaa !9
  %103 = icmp ugt i32 %101, %102
  br i1 %103, label %104, label %107

104:                                              ; preds = %99
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = load i32, ptr %105, align 4, !tbaa !9
  br label %109

107:                                              ; preds = %99
  %108 = load i32, ptr %22, align 4, !tbaa !9
  br label %109

109:                                              ; preds = %107, %104
  %110 = phi i32 [ %106, %104 ], [ %108, %107 ]
  store i32 %110, ptr %22, align 4, !tbaa !9
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(32) %111) #6
  br i1 %112, label %113, label %115

113:                                              ; preds = %109
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  store i8 1, ptr %114, align 1, !tbaa !11
  br label %115

115:                                              ; preds = %113, %109
  %116 = load i32, ptr %18, align 4, !tbaa !9
  %117 = add i32 %116, 1
  store i32 %117, ptr %18, align 4, !tbaa !9
  br label %46, !llvm.loop !32

118:                                              ; preds = %61
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  %120 = load i8, ptr %119, align 1, !tbaa !11, !range !15, !noundef !16
  %121 = trunc i8 %120 to i1
  br i1 %121, label %136, label %122

122:                                              ; preds = %118
  %123 = load i32, ptr %18, align 4, !tbaa !9
  %124 = load i32, ptr %17, align 4, !tbaa !9
  %125 = icmp ule i32 %123, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %122
  br label %130

127:                                              ; preds = %122
  %128 = load i32, ptr %22, align 4, !tbaa !9
  %129 = add i32 %128, 1
  br label %130

130:                                              ; preds = %127, %126
  %131 = phi i32 [ 1, %126 ], [ %129, %127 ]
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 %131, ptr %132, align 4, !tbaa !9
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %133, ptr noundef @.str.4)
          to label %135 unwind label %67

135:                                              ; preds = %130
  br label %136

136:                                              ; preds = %135, %118
  store i1 true, ptr %9, align 1
  store i32 1, ptr %19, align 4
  br label %137

137:                                              ; preds = %136, %97, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  br label %139

138:                                              ; preds = %98, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %142

139:                                              ; preds = %137, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %140

140:                                              ; preds = %139, %30
  %141 = load i1, ptr %9, align 1
  ret i1 %141

142:                                              ; preds = %138
  %143 = load ptr, ptr %23, align 8
  %144 = load i32, ptr %24, align 4
  %145 = insertvalue { ptr, i32 } poison, ptr %143, 0
  %146 = insertvalue { ptr, i32 } %145, i32 %144, 1
  resume { ptr, i32 } %146

147:                                              ; preds = %93
  %148 = landingpad { ptr, i32 }
          catch ptr null
  %149 = extractvalue { ptr, i32 } %148, 0
  call void @__clang_call_terminate(ptr %149) #7
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) #5

declare void @__cxa_end_catch()

attributes #0 = { 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 #1 = { noinline noreturn nounwind uwtable "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !7, i64 568}
!18 = !{!"_ZTSN6simdal8csv_fileE", !19, i64 8, !22, i64 40, !7, i64 568, !10, i64 572}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !21, i64 8, !7, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSSt13basic_fstreamIcSt11char_traitsIcEE", !23, i64 0, !26, i64 24}
!23 = !{!"_ZTSSd", !24, i64 0, !25, i64 16}
!24 = !{!"_ZTSSi", !21, i64 8}
!25 = !{!"_ZTSSo"}
!26 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !27, i64 0, !7, i64 64, !29, i64 104, !30, i64 120, !31, i64 124, !31, i64 132, !31, i64 140, !6, i64 152, !21, i64 160, !12, i64 168, !12, i64 169, !12, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !12, i64 192, !6, i64 200, !6, i64 208, !21, i64 216, !6, i64 224, !6, i64 232}
!27 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !28, i64 56}
!28 = !{!"_ZTSSt6locale", !6, i64 0}
!29 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !12, i64 8}
!30 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!31 = !{!"_ZTS11__mbstate_t", !10, i64 0, !7, i64 4}
!32 = distinct !{!32, !14}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #1

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6simdal8csv_file9read_lineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(576), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6simdal8csv_file14reset_read_posEv(ptr noundef nonnull align 8 dereferenceable(576)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN6simdal8csv_file16get_line_elementEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_c(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6simdal8csv_file9get_id_ofERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjjRbRS6_Rjj(ptr noundef nonnull align 8 dereferenceable(576) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2, i32 noundef %3, ptr nocapture noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %6, i32 noundef %7) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  store i8 0, ptr %4, align 1, !tbaa !5
  %11 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.4)
  %12 = tail call noundef zeroext i1 @_ZN6simdal8csv_file14reset_read_posEv(ptr noundef nonnull align 8 dereferenceable(576) %0)
  br i1 %12, label %13, label %.loopexit45

13:                                               ; preds = %8
  %14 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.4)
  %.not56 = icmp eq i32 %7, 0
  br i1 %.not56, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %13, %16
  %.03555 = phi i32 [ %17, %16 ], [ 0, %13 ]
  %15 = tail call noundef zeroext i1 @_ZN6simdal8csv_file9read_lineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(576) %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
  br i1 %15, label %16, label %.loopexit45

16:                                               ; preds = %.lr.ph
  %17 = add nuw i32 %.03555, 1
  %exitcond.not = icmp eq i32 %17, %7
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %16, %13
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  %18 = getelementptr inbounds i8, ptr %0, i64 568
  br label %.outer

.outer:                                           ; preds = %48, %._crit_edge
  %.1.ph = phi i32 [ %49, %48 ], [ %7, %._crit_edge ]
  %.034.ph = phi i32 [ %..034, %48 ], [ 0, %._crit_edge ]
  br label %19

19:                                               ; preds = %.outer, %29
  %20 = load i8, ptr %4, align 1, !tbaa !5, !range !11, !noundef !12
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %.critedge, label %22

22:                                               ; preds = %19
  %23 = invoke noundef zeroext i1 @_ZN6simdal8csv_file9read_lineERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(576) %0, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %24 unwind label %.loopexit.loopexit

24:                                               ; preds = %22
  br i1 %23, label %25, label %.critedge

25:                                               ; preds = %24
  %26 = load i8, ptr %18, align 8, !tbaa !13
  %27 = invoke noundef zeroext i1 @_ZN6simdal8csv_file16get_line_elementEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_c(i32 noundef %2, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %9, i8 noundef signext %26)
          to label %28 unwind label %.loopexit.loopexit

28:                                               ; preds = %25
  br i1 %27, label %29, label %.critedge

29:                                               ; preds = %28
  %30 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br i1 %30, label %19, label %31, !llvm.loop !30

.loopexit.loopexit:                               ; preds = %25, %22
  %lpad.loopexit42 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.loopexit.split-lp:                      ; preds = %31
  %lpad.loopexit.split-lp43 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp:                               ; preds = %44, %52
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

31:                                               ; preds = %29
  %32 = load i8, ptr %18, align 8, !tbaa !13
  %33 = invoke noundef zeroext i1 @_ZN6simdal8csv_file16get_line_elementEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_c(i32 noundef %3, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %10, i8 noundef signext %32)
          to label %34 unwind label %.loopexit.loopexit.split-lp

34:                                               ; preds = %31
  br i1 %33, label %35, label %.loopexit41

35:                                               ; preds = %34
  %36 = invoke noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef null, i32 noundef 10)
          to label %37 unwind label %39

37:                                               ; preds = %35
  store i32 %36, ptr %6, align 4, !tbaa !31
  %..034 = call i32 @llvm.umax.i32(i32 %36, i32 %.034.ph)
  %38 = call noundef zeroext i1 @_ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  br i1 %38, label %47, label %48

39:                                               ; preds = %35
  %40 = landingpad { ptr, i32 }
          catch ptr null
  %41 = extractvalue { ptr, i32 } %40, 0
  %42 = call ptr @__cxa_begin_catch(ptr %41) #7
  %43 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.4)
          to label %44 unwind label %45

44:                                               ; preds = %39
  invoke void @__cxa_end_catch()
          to label %.loopexit41 unwind label %.loopexit.split-lp

45:                                               ; preds = %39
  %46 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %.loopexit unwind label %56

47:                                               ; preds = %37
  store i8 1, ptr %4, align 1, !tbaa !5
  br label %48

48:                                               ; preds = %47, %37
  %49 = add i32 %.1.ph, 1
  br label %.outer, !llvm.loop !30

.critedge:                                        ; preds = %24, %19, %28
  %50 = load i8, ptr %4, align 1, !tbaa !5, !range !11, !noundef !12
  %51 = trunc nuw i8 %50 to i1
  br i1 %51, label %.loopexit41, label %52

52:                                               ; preds = %.critedge
  %.not = icmp ugt i32 %.1.ph, %7
  %53 = add i32 %.034.ph, 1
  %54 = select i1 %.not, i32 %53, i32 1
  store i32 %54, ptr %6, align 4, !tbaa !31
  %55 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.4)
          to label %.loopexit41 unwind label %.loopexit.split-lp

.loopexit41:                                      ; preds = %34, %.critedge, %52, %44
  %.036 = phi i1 [ false, %44 ], [ true, %52 ], [ true, %.critedge ], [ false, %34 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %.loopexit45

.loopexit:                                        ; preds = %.loopexit.split-lp, %.loopexit.loopexit.split-lp, %.loopexit.loopexit, %45
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ], [ %lpad.loopexit42, %.loopexit.loopexit ], [ %lpad.loopexit.split-lp43, %.loopexit.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  resume { ptr, i32 } %.pn

.loopexit45:                                      ; preds = %.lr.ph, %.loopexit41, %8
  %.2 = phi i1 [ false, %8 ], [ %.036, %.loopexit41 ], [ false, %.lr.ph ]
  ret i1 %.2

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          catch ptr null
  %58 = extractvalue { ptr, i32 } %57, 0
  call void @__clang_call_terminate(ptr %58) #8
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef) local_unnamed_addr #5

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #6

attributes #0 = { 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 #1 = { noinline noreturn nounwind uwtable "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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !7, i64 568}
!14 = !{!"_ZTSN6simdal8csv_fileE", !15, i64 8, !19, i64 40, !7, i64 568, !29, i64 572}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !16, i64 0, !18, i64 8, !7, i64 16}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSSt13basic_fstreamIcSt11char_traitsIcEE", !20, i64 0, !23, i64 24}
!20 = !{!"_ZTSSd", !21, i64 0, !22, i64 16}
!21 = !{!"_ZTSSi", !18, i64 8}
!22 = !{!"_ZTSSo"}
!23 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !24, i64 0, !7, i64 64, !26, i64 104, !27, i64 120, !28, i64 124, !28, i64 132, !28, i64 140, !17, i64 152, !18, i64 160, !6, i64 168, !6, i64 169, !6, i64 170, !7, i64 171, !17, i64 176, !17, i64 184, !6, i64 192, !17, i64 200, !17, i64 208, !18, i64 216, !17, i64 224, !17, i64 232}
!24 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !25, i64 56}
!25 = !{!"_ZTSSt6locale", !17, i64 0}
!26 = !{!"_ZTSSt12__basic_fileIcE", !17, i64 0, !6, i64 8}
!27 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!28 = !{!"_ZTS11__mbstate_t", !29, i64 0, !7, i64 4}
!29 = !{!"int", !7, i64 0}
!30 = distinct !{!30, !10}
!31 = !{!29, !29, i64 0}


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