; LLVM IR from Trusted-eSign/trusted-crypto :: deps/wrapper/src/store (cashjson)

; 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.LoggerFunction = type { %class.Handle, ptr }
%class.Handle = type { ptr }
%class.Handle.0 = type { ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"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.1 }
%union.anon.1 = 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.CashJson = type { %class.Handle }

@logger = external global ptr, align 8
@__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE = external hidden unnamed_addr constant [9 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.LoggerFunction, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca %class.Handle.0, align 8
  %10 = alloca %class.Handle.0, align 8
  %11 = alloca i1, align 1
  %12 = alloca %"class.std::basic_ifstream", align 8
  %13 = alloca %"class.std::basic_ofstream", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %class.Handle.0, align 8
  %16 = alloca %class.Handle.0, align 8
  %17 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8
  %19 = getelementptr inbounds %class.CashJson, ptr %18, i32 0, i32 0
  call void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPS5_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #10
  %20 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef %20, ptr noundef @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE)
          to label %21 unwind label %42

21:                                               ; preds = %2
  %22 = getelementptr inbounds %class.CashJson, ptr %18, i32 0, i32 0
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %24 unwind label %46

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %25 = invoke noundef ptr @_ZNK6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %26 unwind label %50

26:                                               ; preds = %24
  %27 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %25) #10
  %28 = invoke noalias ptr @fopen(ptr noundef %27, ptr noundef @.str)
          to label %29 unwind label %50

29:                                               ; preds = %26
  store ptr %28, ptr %8, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %80, label %32

32:                                               ; preds = %29
  %33 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef @.str.1)
          to label %34 unwind label %50

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %35 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #11
          to label %36 unwind label %54

36:                                               ; preds = %34
  store i1 true, ptr %11, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef null)
          to label %37 unwind label %58

37:                                               ; preds = %36
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %35, i1 noundef zeroext false, ptr noundef @.str.2, i32 noundef 14, i32 noundef 0, ptr noundef @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef %10, ptr noundef @.str.1)
          to label %38 unwind label %62

38:                                               ; preds = %37
  store i1 false, ptr %11, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %35)
          to label %39 unwind label %62

39:                                               ; preds = %38
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  %40 = call ptr @__cxa_allocate_exception(i64 8) #10
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %41 unwind label %70

41:                                               ; preds = %39
  invoke void @__cxa_throw(ptr %40, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #12
          to label %184 unwind label %74

42:                                               ; preds = %2
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %6, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %7, align 4
  br label %175

46:                                               ; preds = %21
  %47 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %6, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %7, align 4
  br label %124

50:                                               ; preds = %80, %32, %26, %24
  %51 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %6, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %7, align 4
  br label %123

54:                                               ; preds = %34
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  br label %79

58:                                               ; preds = %36
  %59 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %6, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %7, align 4
  br label %66

62:                                               ; preds = %38, %37
  %63 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %6, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %7, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #10
  br label %66

66:                                               ; preds = %62, %58
  %67 = load i1, ptr %11, align 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %66
  call void @_ZdlPvm(ptr noundef %35, i64 noundef 176) #13
  br label %69

69:                                               ; preds = %68, %66
  br label %79

70:                                               ; preds = %39
  %71 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %6, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %7, align 4
  call void @__cxa_free_exception(ptr %40) #10
  br label %78

74:                                               ; preds = %41
  %75 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  br label %78

78:                                               ; preds = %74, %70
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  br label %79

79:                                               ; preds = %78, %69, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  br label %123

80:                                               ; preds = %29
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = invoke i32 @fclose(ptr noundef %81)
          to label %83 unwind label %50

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 520, ptr %12) #10
  %84 = getelementptr inbounds %class.CashJson, ptr %18, i32 0, i32 0
  %85 = invoke noundef ptr @_ZNK6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %86 unwind label %103

86:                                               ; preds = %83
  %87 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %85) #10
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %12, ptr noundef %87, i32 noundef 4)
          to label %88 unwind label %103

88:                                               ; preds = %86
  %89 = invoke noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %90 unwind label %107

90:                                               ; preds = %88
  %91 = call noundef i32 @_ZNSt11char_traitsIcE3eofEv() #10
  %92 = icmp eq i32 %89, %91
  br i1 %92, label %93, label %120

93:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 512, ptr %13) #10
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13)
          to label %94 unwind label %111

94:                                               ; preds = %93
  %95 = getelementptr inbounds %class.CashJson, ptr %18, i32 0, i32 0
  %96 = invoke noundef ptr @_ZNK6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %95)
          to label %97 unwind label %115

97:                                               ; preds = %94
  %98 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %96) #10
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %13, ptr noundef %98, i32 noundef 16)
          to label %99 unwind label %115

99:                                               ; preds = %97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str.3)
          to label %101 unwind label %115

101:                                              ; preds = %99
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %13)
          to label %102 unwind label %115

102:                                              ; preds = %101
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #10
  call void @llvm.lifetime.end.p0(i64 512, ptr %13) #10
  br label %120

103:                                              ; preds = %86, %83
  %104 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %6, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %7, align 4
  br label %122

107:                                              ; preds = %88
  %108 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %6, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %7, align 4
  br label %121

111:                                              ; preds = %93
  %112 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %6, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %7, align 4
  br label %119

115:                                              ; preds = %101, %99, %97, %94
  %116 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %6, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %7, align 4
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %13) #10
  br label %119

119:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 512, ptr %13) #10
  br label %121

120:                                              ; preds = %102, %90
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #10
  call void @llvm.lifetime.end.p0(i64 520, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %173

121:                                              ; preds = %119, %107
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #10
  br label %122

122:                                              ; preds = %121, %103
  call void @llvm.lifetime.end.p0(i64 520, ptr %12) #10
  br label %123

123:                                              ; preds = %122, %79, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %124

124:                                              ; preds = %123, %46
  %125 = load i32, ptr %7, align 4
  %126 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTI6HandleI9ExceptionE) #10
  %127 = icmp eq i32 %125, %126
  br i1 %127, label %128, label %174

128:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %129 = load ptr, ptr %6, align 8
  %130 = call ptr @__cxa_begin_catch(ptr %129) #10
  store ptr %130, ptr %14, align 8
  %131 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %131, ptr noundef @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef @.str.4)
          to label %132 unwind label %141

132:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  %133 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 176) #11
          to label %134 unwind label %145

134:                                              ; preds = %132
  store i1 true, ptr %17, align 1
  %135 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %135)
          to label %136 unwind label %149

136:                                              ; preds = %134
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %133, i1 noundef zeroext false, ptr noundef @.str.2, i32 noundef 28, i32 noundef 0, ptr noundef @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef %16, ptr noundef @.str.4)
          to label %137 unwind label %153

137:                                              ; preds = %136
  store i1 false, ptr %17, align 1
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %133)
          to label %138 unwind label %153

138:                                              ; preds = %137
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #10
  %139 = call ptr @__cxa_allocate_exception(i64 8) #10
  invoke void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %139, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %140 unwind label %161

140:                                              ; preds = %138
  invoke void @__cxa_throw(ptr %139, ptr @_ZTI6HandleI9ExceptionE, ptr @_ZN6HandleI9ExceptionED2Ev) #12
          to label %184 unwind label %165

141:                                              ; preds = %128
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %6, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %7, align 4
  br label %171

145:                                              ; preds = %132
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %6, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %7, align 4
  br label %170

149:                                              ; preds = %134
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %6, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %7, align 4
  br label %157

153:                                              ; preds = %137, %136
  %154 = landingpad { ptr, i32 }
          cleanup
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %6, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %7, align 4
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #10
  br label %157

157:                                              ; preds = %153, %149
  %158 = load i1, ptr %17, align 1
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  call void @_ZdlPvm(ptr noundef %133, i64 noundef 176) #13
  br label %160

160:                                              ; preds = %159, %157
  br label %170

161:                                              ; preds = %138
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %6, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %7, align 4
  call void @__cxa_free_exception(ptr %139) #10
  br label %169

165:                                              ; preds = %140
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %6, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %7, align 4
  br label %169

169:                                              ; preds = %165, %161
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #10
  br label %170

170:                                              ; preds = %169, %160, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  br label %171

171:                                              ; preds = %170, %141
  invoke void @__cxa_end_catch()
          to label %172 unwind label %181

172:                                              ; preds = %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %174

173:                                              ; preds = %120
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #10
  ret void

174:                                              ; preds = %172, %124
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #10
  br label %175

175:                                              ; preds = %174, %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #10
  call void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #10
  br label %176

176:                                              ; preds = %175
  %177 = load ptr, ptr %6, align 8
  %178 = load i32, ptr %7, align 4
  %179 = insertvalue { ptr, i32 } poison, ptr %177, 0
  %180 = insertvalue { ptr, i32 } %179, i32 %178, 1
  resume { ptr, i32 } %180

181:                                              ; preds = %171
  %182 = landingpad { ptr, i32 }
          catch ptr null
  %183 = extractvalue { ptr, i32 } %182, 0
  call void @__clang_call_terminate(ptr %183) #14
  unreachable

184:                                              ; preds = %140, %41
  unreachable
}

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

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

declare void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

declare void @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ...) #2

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

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

declare void @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ...) unnamed_addr #2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare i32 @fclose(ptr noundef) #2

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

declare noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt11char_traitsIcE3eofEv() #3 align 2

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

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

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

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

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

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

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

; Function Attrs: nounwind
declare void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #9

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nounwind memory(none) }
attributes #8 = { 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 #9 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nounwind }
attributes #11 = { builtin allocsize(0) }
attributes #12 = { noreturn }
attributes #13 = { builtin nounwind }
attributes #14 = { 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"}


; 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.LoggerFunction = type { %class.Handle, ptr }
%class.Handle = type { ptr }
%class.Handle.0 = type { ptr }
%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"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.1 }
%union.anon.1 = 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 }

@logger = external local_unnamed_addr global ptr, align 8
@__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE = external hidden unnamed_addr constant [9 x i8], align 1
@_ZTI6HandleI9ExceptionE = external dso_local constant { ptr, ptr }, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [98 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.LoggerFunction, align 8
  %4 = alloca %class.Handle.0, align 8
  %5 = alloca %class.Handle.0, align 8
  %6 = alloca %"class.std::basic_ifstream", align 8
  %7 = alloca %"class.std::basic_ofstream", align 8
  %8 = alloca %class.Handle.0, align 8
  %9 = alloca %class.Handle.0, align 8
  tail call void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2EPS5_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #11
  %10 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef %10, ptr noundef nonnull @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE)
          to label %11 unwind label %28

11:                                               ; preds = %2
  %12 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %13 unwind label %32

13:                                               ; preds = %11
  %14 = invoke noundef ptr @_ZNK6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %15 unwind label %34

15:                                               ; preds = %13
  %16 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #11
  %17 = call noalias ptr @fopen(ptr noundef %16, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %17, null
  br i1 %.not, label %18, label %45

18:                                               ; preds = %15
  %19 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef nonnull @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef nonnull @.str.1)
          to label %20 unwind label %34

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #11
  %21 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #12
          to label %22 unwind label %36

22:                                               ; preds = %20
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef null)
          to label %23 unwind label %.thread

23:                                               ; preds = %22
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %21, i1 noundef zeroext false, ptr noundef nonnull @.str.2, i32 noundef 14, i32 noundef 0, ptr noundef nonnull @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef nonnull @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef nonnull %5, ptr noundef nonnull @.str.1)
          to label %25 unwind label %.thread39

.thread39:                                        ; preds = %23
  %24 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #11
  br label %41

25:                                               ; preds = %23
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %21)
          to label %26 unwind label %39

26:                                               ; preds = %25
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #11
  %27 = call ptr @__cxa_allocate_exception(i64 8) #11
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @__cxa_throw(ptr nonnull %27, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #13
          to label %108 unwind label %42

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  %31 = extractvalue { ptr, i32 } %29, 1
  br label %102

32:                                               ; preds = %11
  %33 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %76

34:                                               ; preds = %18, %13
  %35 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %76

36:                                               ; preds = %20
  %37 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %44

.thread:                                          ; preds = %22
  %38 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %41

39:                                               ; preds = %25
  %40 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #11
  br label %44

41:                                               ; preds = %.thread39, %.thread
  %.pn38 = phi { ptr, i32 } [ %38, %.thread ], [ %24, %.thread39 ]
  call void @_ZdlPvm(ptr noundef nonnull %21, i64 noundef 176) #14
  br label %44

42:                                               ; preds = %26
  %43 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #11
  br label %44

44:                                               ; preds = %39, %41, %42, %36
  %.pn25 = phi { ptr, i32 } [ %43, %42 ], [ %.pn38, %41 ], [ %40, %39 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #11
  br label %76

45:                                               ; preds = %15
  %46 = call i32 @fclose(ptr noundef nonnull %17)
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %6) #11
  %47 = invoke noundef ptr @_ZNK6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %48 unwind label %64

48:                                               ; preds = %45
  %49 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %47) #11
  invoke void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %6, ptr noundef %49, i32 noundef 4)
          to label %50 unwind label %64

50:                                               ; preds = %48
  %51 = invoke noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %52 unwind label %66

52:                                               ; preds = %50
  %53 = call noundef i32 @_ZNSt11char_traitsIcE3eofEv() #11
  %54 = icmp eq i32 %51, %53
  br i1 %54, label %55, label %73

55:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %7) #11
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(248) %7)
          to label %56 unwind label %68

56:                                               ; preds = %55
  %57 = invoke noundef ptr @_ZNK6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %58 unwind label %70

58:                                               ; preds = %56
  %59 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %57) #11
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE4openEPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(248) %7, ptr noundef %59, i32 noundef 16)
          to label %60 unwind label %70

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @.str.3)
          to label %62 unwind label %70

62:                                               ; preds = %60
  invoke void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv(ptr noundef nonnull align 8 dereferenceable(248) %7)
          to label %63 unwind label %70

63:                                               ; preds = %62
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %7) #11
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %7) #11
  br label %73

64:                                               ; preds = %48, %45
  %65 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %75

66:                                               ; preds = %50
  %67 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %74

68:                                               ; preds = %55
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  br label %72

70:                                               ; preds = %62, %60, %58, %56
  %71 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTI6HandleI9ExceptionE
  call void @_ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(248) %7) #11
  br label %72

72:                                               ; preds = %70, %68
  %.pn27 = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %7) #11
  br label %74

73:                                               ; preds = %63, %52
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %6) #11
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %6) #11
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  ret void

74:                                               ; preds = %72, %66
  %.pn27.pn = phi { ptr, i32 } [ %.pn27, %72 ], [ %67, %66 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %6) #11
  br label %75

75:                                               ; preds = %74, %64
  %.pn27.pn.pn = phi { ptr, i32 } [ %.pn27.pn, %74 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %6) #11
  br label %76

76:                                               ; preds = %34, %44, %75, %32
  %.pn27.pn.pn.pn.pn = phi { ptr, i32 } [ %33, %32 ], [ %.pn27.pn.pn, %75 ], [ %.pn25, %44 ], [ %35, %34 ]
  %.6 = extractvalue { ptr, i32 } %.pn27.pn.pn.pn.pn, 0
  %.618 = extractvalue { ptr, i32 } %.pn27.pn.pn.pn.pn, 1
  %77 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTI6HandleI9ExceptionE) #11
  %78 = icmp eq i32 %.618, %77
  br i1 %78, label %79, label %101

79:                                               ; preds = %76
  %80 = call ptr @__cxa_begin_catch(ptr %.6) #11
  %81 = load ptr, ptr @logger, align 8, !tbaa !5
  invoke void (ptr, ptr, ptr, ...) @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef nonnull @.str.4)
          to label %82 unwind label %88

82:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #11
  %83 = invoke noalias noundef nonnull dereferenceable(176) ptr @_Znwm(i64 noundef 176) #12
          to label %84 unwind label %90

84:                                               ; preds = %82
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %80)
  invoke void (ptr, i1, ptr, i32, i32, ptr, ptr, ptr, ptr, ...) @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176) %83, i1 noundef zeroext false, ptr noundef nonnull @.str.2, i32 noundef 28, i32 noundef 0, ptr noundef nonnull @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef nonnull @__FUNCTION__._ZN8CashJsonC2E6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE, ptr noundef nonnull %9, ptr noundef nonnull @.str.4)
          to label %85 unwind label %94

85:                                               ; preds = %84
  invoke void @_ZN6HandleI9ExceptionEC2EPS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %83)
          to label %86 unwind label %92

86:                                               ; preds = %85
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #11
  %87 = call ptr @__cxa_allocate_exception(i64 8) #11
  call void @_ZN6HandleI9ExceptionEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull align 8 dereferenceable(8) %8)
  invoke void @__cxa_throw(ptr nonnull %87, ptr nonnull @_ZTI6HandleI9ExceptionE, ptr nonnull @_ZN6HandleI9ExceptionED2Ev) #13
          to label %108 unwind label %96

88:                                               ; preds = %79
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %99

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

92:                                               ; preds = %85
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #11
  br label %98

94:                                               ; preds = %84
  %95 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #11
  call void @_ZdlPvm(ptr noundef nonnull %83, i64 noundef 176) #14
  br label %98

96:                                               ; preds = %86
  %97 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6HandleI9ExceptionED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #11
  br label %98

98:                                               ; preds = %92, %94, %96, %90
  %.pn33 = phi { ptr, i32 } [ %97, %96 ], [ %95, %94 ], [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #11
  br label %99

99:                                               ; preds = %98, %88
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %98 ], [ %89, %88 ]
  invoke void @__cxa_end_catch()
          to label %100 unwind label %105

100:                                              ; preds = %99
  %.8 = extractvalue { ptr, i32 } %.pn33.pn, 0
  %.820 = extractvalue { ptr, i32 } %.pn33.pn, 1
  br label %101

101:                                              ; preds = %100, %76
  %.921 = phi i32 [ %.820, %100 ], [ %.618, %76 ]
  %.9 = phi ptr [ %.8, %100 ], [ %.6, %76 ]
  call void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #11
  br label %102

102:                                              ; preds = %101, %28
  %.1022 = phi i32 [ %.921, %101 ], [ %31, %28 ]
  %.10 = phi ptr [ %.9, %101 ], [ %30, %28 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #11
  call void @_ZN6HandleINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #11
  %103 = insertvalue { ptr, i32 } poison, ptr %.10, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %.1022, 1
  resume { ptr, i32 } %104

105:                                              ; preds = %99
  %106 = landingpad { ptr, i32 }
          catch ptr null
  %107 = extractvalue { ptr, i32 } %106, 0
  call void @__clang_call_terminate(ptr %107) #15
  unreachable

108:                                              ; preds = %86, %26
  unreachable
}

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

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

declare void @_ZN14LoggerFunctionC1EP6LoggerPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @_ZN6Logger5errorEPKcS1_z(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ...) local_unnamed_addr #2

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

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

declare void @_ZN9ExceptionC1EbPKciiS1_S1_6HandleIS_ES1_z(ptr noundef nonnull align 8 dereferenceable(176), i1 noundef zeroext, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ...) unnamed_addr #2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

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

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

declare noundef i32 @_ZNSi4peekEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNSt11char_traitsIcE3eofEv() local_unnamed_addr #4 align 2

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

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

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

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

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

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #8

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

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

; Function Attrs: nounwind
declare void @_ZN14LoggerFunctionD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #10

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nofree nosync nounwind memory(none) }
attributes #9 = { 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 #10 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #11 = { nounwind }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { noreturn }
attributes #14 = { builtin nounwind }
attributes #15 = { 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"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass