; LLVM IR from chdb-io/chdb :: base/poco/Foundation/src (NamedMutex)

; 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.std::allocator" = type { i8 }
%"class.Poco::Any" = type { ptr }
%"union.Poco::semun" = type { ptr }
%"class.Poco::NamedMutexImpl" = type <{ %"class.std::__cxx11::basic_string", i32, i8, [3 x i8] }>

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@_ZTIN4Poco15SystemExceptionE = external constant ptr
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Poco14NamedMutexImplC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.Poco::Any", align 8
  %13 = alloca i1, align 1
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.Poco::Any", align 8
  %19 = alloca %"class.Poco::Any", align 8
  %20 = alloca i1, align 1
  %21 = alloca %"union.Poco::semun", align 8
  %22 = alloca %"union.Poco::semun", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator", align 1
  %27 = alloca %"class.Poco::Any", align 8
  %28 = alloca %"class.Poco::Any", align 8
  %29 = alloca i1, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %3, align 8
  %31 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %32)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #7
  invoke void @_ZN4Poco14NamedMutexImpl11getFileNameB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 8 dereferenceable(37) %30)
          to label %33 unwind label %43

33:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %34 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %35 = invoke i32 (ptr, i32, ...) @open(ptr noundef %34, i32 noundef 64, i32 noundef 420)
          to label %36 unwind label %47

36:                                               ; preds = %33
  store i32 %35, ptr %8, align 4, !tbaa !9
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = icmp ne i32 %37, -1
  br i1 %38, label %39, label %51

39:                                               ; preds = %36
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = invoke i32 @close(i32 noundef %40)
          to label %42 unwind label %47

42:                                               ; preds = %39
  br label %80

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

47:                                               ; preds = %39, %33
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %6, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %7, align 4
  br label %188

51:                                               ; preds = %36
  store i1 true, ptr %13, align 1
  %52 = call ptr @__cxa_allocate_exception(i64 56) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %53 unwind label %58

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  invoke void @_ZN4Poco3AnyC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %54 unwind label %62

54:                                               ; preds = %53
  invoke void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %55 unwind label %66

55:                                               ; preds = %54
  %56 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 0
  invoke void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52) %52, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(32) %56, i32 noundef 0)
          to label %57 unwind label %70

57:                                               ; preds = %55
  store i1 false, ptr %13, align 1
  invoke void @__cxa_throw(ptr %52, ptr @_ZTIN4Poco15SystemExceptionE, ptr @_ZN4Poco15SystemExceptionD1Ev) #8
          to label %195 unwind label %70

58:                                               ; preds = %51
  %59 = landingpad { ptr, i32 }
          cleanup
  %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 %76

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  %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
  br label %75

66:                                               ; preds = %54
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %6, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %7, align 4
  br label %74

70:                                               ; preds = %57, %55
  %71 = landingpad { ptr, i32 }
          cleanup
  %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 @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %74

74:                                               ; preds = %70, %66
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %75

75:                                               ; preds = %74, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %76

76:                                               ; preds = %75, %58
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  %77 = load i1, ptr %13, align 1
  br i1 %77, label %78, label %79

78:                                               ; preds = %76
  call void @__cxa_free_exception(ptr %52) #7
  br label %79

79:                                               ; preds = %78, %76
  br label %188

80:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %81 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %82 = call i32 @ftok(ptr noundef %81, i32 noundef 112) #7
  store i32 %82, ptr %14, align 4, !tbaa !9
  %83 = load i32, ptr %14, align 4, !tbaa !9
  %84 = icmp eq i32 %83, -1
  br i1 %84, label %85, label %121

85:                                               ; preds = %80
  store i1 true, ptr %20, align 1
  %86 = call ptr @__cxa_allocate_exception(i64 56) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %87 unwind label %94

87:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  invoke void @_ZN4Poco3AnyC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %88 unwind label %98

88:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %89 = call ptr @__errno_location() #9
  invoke void @_ZN4Poco3AnyC2IiEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(4) %89)
          to label %90 unwind label %102

90:                                               ; preds = %88
  invoke void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyESA_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %91 unwind label %106

91:                                               ; preds = %90
  %92 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 0
  invoke void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52) %86, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(32) %92, i32 noundef 0)
          to label %93 unwind label %110

93:                                               ; preds = %91
  store i1 false, ptr %20, align 1
  invoke void @__cxa_throw(ptr %86, ptr @_ZTIN4Poco15SystemExceptionE, ptr @_ZN4Poco15SystemExceptionD1Ev) #8
          to label %195 unwind label %110

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

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

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

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

110:                                              ; preds = %93, %91
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %6, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %114

114:                                              ; preds = %110, %106
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %115

115:                                              ; preds = %114, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  br label %116

116:                                              ; preds = %115, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %117

117:                                              ; preds = %116, %94
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  %118 = load i1, ptr %20, align 1
  br i1 %118, label %119, label %120

119:                                              ; preds = %117
  call void @__cxa_free_exception(ptr %86) #7
  br label %120

120:                                              ; preds = %119, %117
  br label %187

121:                                              ; preds = %80
  %122 = load i32, ptr %14, align 4, !tbaa !9
  %123 = call i32 @semget(i32 noundef %122, i32 noundef 1, i32 noundef 1974) #7
  %124 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 1
  store i32 %123, ptr %124, align 8, !tbaa !11
  %125 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 1
  %126 = load i32, ptr %125, align 8, !tbaa !11
  %127 = icmp sge i32 %126, 0
  br i1 %127, label %128, label %135

128:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  store i32 1, ptr %21, align 8, !tbaa !17
  %129 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 1
  %130 = load i32, ptr %129, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %21, i64 8, i1 false), !tbaa.struct !18
  %131 = getelementptr inbounds %"union.Poco::semun", ptr %22, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8
  %133 = call i32 (i32, i32, i32, ...) @semctl(i32 noundef %130, i32 noundef 0, i32 noundef 16, ptr %132) #7
  %134 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 2
  store i8 1, ptr %134, align 4, !tbaa !19
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %186

135:                                              ; preds = %121
  %136 = call ptr @__errno_location() #9
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = icmp eq i32 %137, 17
  br i1 %138, label %139, label %149

139:                                              ; preds = %135
  %140 = load i32, ptr %14, align 4, !tbaa !9
  %141 = call i32 @semget(i32 noundef %140, i32 noundef 1, i32 noundef 0) #7
  %142 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 1
  store i32 %141, ptr %142, align 8, !tbaa !11
  %143 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 2
  store i8 0, ptr %143, align 4, !tbaa !19
  %144 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 1
  %145 = load i32, ptr %144, align 8, !tbaa !11
  %146 = icmp sge i32 %145, 0
  br i1 %146, label %147, label %148

147:                                              ; preds = %139
  store i32 1, ptr %23, align 4
  br label %186

148:                                              ; preds = %139
  br label %149

149:                                              ; preds = %148, %135
  br label %150

150:                                              ; preds = %149
  store i1 true, ptr %29, align 1
  %151 = call ptr @__cxa_allocate_exception(i64 56) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %152 unwind label %159

152:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  invoke void @_ZN4Poco3AnyC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %153 unwind label %163

153:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %154 = call ptr @__errno_location() #9
  invoke void @_ZN4Poco3AnyC2IiEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(4) %154)
          to label %155 unwind label %167

155:                                              ; preds = %153
  invoke void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyESA_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %156 unwind label %171

156:                                              ; preds = %155
  %157 = getelementptr inbounds %"class.Poco::NamedMutexImpl", ptr %30, i32 0, i32 0
  invoke void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52) %151, ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(32) %157, i32 noundef 0)
          to label %158 unwind label %175

158:                                              ; preds = %156
  store i1 false, ptr %29, align 1
  invoke void @__cxa_throw(ptr %151, ptr @_ZTIN4Poco15SystemExceptionE, ptr @_ZN4Poco15SystemExceptionD1Ev) #8
          to label %195 unwind label %175

159:                                              ; preds = %150
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %6, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %7, align 4
  br label %182

163:                                              ; preds = %152
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %6, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %7, align 4
  br label %181

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

171:                                              ; preds = %155
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %6, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %7, align 4
  br label %179

175:                                              ; preds = %158, %156
  %176 = landingpad { ptr, i32 }
          cleanup
  %177 = extractvalue { ptr, i32 } %176, 0
  store ptr %177, ptr %6, align 8
  %178 = extractvalue { ptr, i32 } %176, 1
  store i32 %178, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  br label %179

179:                                              ; preds = %175, %171
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br label %180

180:                                              ; preds = %179, %167
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #7
  br label %181

181:                                              ; preds = %180, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #7
  br label %182

182:                                              ; preds = %181, %159
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  %183 = load i1, ptr %29, align 1
  br i1 %183, label %184, label %185

184:                                              ; preds = %182
  call void @__cxa_free_exception(ptr %151) #7
  br label %185

185:                                              ; preds = %184, %182
  br label %187

186:                                              ; preds = %147, %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  ret void

187:                                              ; preds = %185, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %188

188:                                              ; preds = %187, %79, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %189

189:                                              ; preds = %188, %43
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #7
  br label %190

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

195:                                              ; preds = %158, %93, %57
  unreachable
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), 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.start.p0(i64 immarg, ptr nocapture) #1

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

declare i32 @__gxx_personality_v0(...)

declare i32 @open(ptr noundef, i32 noundef, ...) #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 i32 @close(i32 noundef) #2

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

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

declare void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4Poco15SystemExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare i32 @ftok(ptr noundef, i32 noundef) #4

declare void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyESA_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

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

; Function Attrs: nounwind
declare i32 @semget(i32 noundef, i32 noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @semctl(i32 noundef, i32 noundef, i32 noundef, ...) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { 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 #5 = { nounwind willreturn memory(none) "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 nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { nounwind willreturn memory(none) }

!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, !10, i64 32}
!12 = !{!"_ZTSN4Poco14NamedMutexImplE", !13, i64 0, !10, i64 32, !16, i64 36}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{i64 0, i64 8, !17}
!19 = !{!12, !16, i64 36}


; 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] }
%"class.std::allocator" = type { i8 }
%"class.Poco::Any" = type { ptr }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@_ZTIN4Poco15SystemExceptionE = external constant ptr
@.str.1 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Poco14NamedMutexImplC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"class.Poco::Any", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca %"class.Poco::Any", align 8
  %12 = alloca %"class.Poco::Any", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.Poco::Any", align 8
  %17 = alloca %"class.Poco::Any", align 8
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  invoke void @_ZN4Poco14NamedMutexImpl11getFileNameB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %3, ptr noundef nonnull align 8 dereferenceable(37) %0)
          to label %18 unwind label %24

18:                                               ; preds = %2
  %19 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %20 = invoke i32 (ptr, i32, ...) @open(ptr noundef %19, i32 noundef 64, i32 noundef 420)
          to label %21 unwind label %26

21:                                               ; preds = %18
  %.not = icmp eq i32 %20, -1
  br i1 %.not, label %28, label %22

22:                                               ; preds = %21
  %23 = invoke i32 @close(i32 noundef %20)
          to label %44 unwind label %26

24:                                               ; preds = %2
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %106

26:                                               ; preds = %22, %18
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %105

28:                                               ; preds = %21
  %29 = call ptr @__cxa_allocate_exception(i64 56) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %30 unwind label %.thread

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  invoke void @_ZN4Poco3AnyC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %31 unwind label %35

31:                                               ; preds = %30
  invoke void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %32 unwind label %37

32:                                               ; preds = %31
  invoke void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52) %29, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0)
          to label %33 unwind label %39

33:                                               ; preds = %32
  invoke void @__cxa_throw(ptr nonnull %29, ptr nonnull @_ZTIN4Poco15SystemExceptionE, ptr nonnull @_ZN4Poco15SystemExceptionD1Ev) #8
          to label %107 unwind label %39

.thread:                                          ; preds = %28
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %43

35:                                               ; preds = %30
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %42

37:                                               ; preds = %31
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %33, %32
  %.036 = phi i1 [ false, %33 ], [ true, %32 ]
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %41

41:                                               ; preds = %39, %37
  %.137 = phi i1 [ %.036, %39 ], [ true, %37 ]
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %42

42:                                               ; preds = %35, %41
  %.238 = phi i1 [ %.137, %41 ], [ true, %35 ]
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br i1 %.238, label %43, label %105

43:                                               ; preds = %.thread, %42
  %.pn.pn.pn61 = phi { ptr, i32 } [ %34, %.thread ], [ %.pn.pn, %42 ]
  call void @__cxa_free_exception(ptr %29) #7
  br label %105

44:                                               ; preds = %22
  %45 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %46 = call i32 @ftok(ptr noundef %45, i32 noundef 112) #7
  %47 = icmp eq i32 %46, -1
  br i1 %47, label %48, label %69

48:                                               ; preds = %44
  %49 = call ptr @__cxa_allocate_exception(i64 56) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %50 unwind label %.thread62

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  invoke void @_ZN4Poco3AnyC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %51 unwind label %57

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %52 = tail call ptr @__errno_location() #9
  invoke void @_ZN4Poco3AnyC2IiEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(4) %52)
          to label %53 unwind label %59

53:                                               ; preds = %51
  invoke void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyESA_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %54 unwind label %61

54:                                               ; preds = %53
  invoke void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52) %49, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0)
          to label %55 unwind label %63

55:                                               ; preds = %54
  invoke void @__cxa_throw(ptr nonnull %49, ptr nonnull @_ZTIN4Poco15SystemExceptionE, ptr nonnull @_ZN4Poco15SystemExceptionD1Ev) #8
          to label %107 unwind label %63

.thread62:                                        ; preds = %48
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %68

57:                                               ; preds = %50
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %67

59:                                               ; preds = %51
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %66

61:                                               ; preds = %53
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %55, %54
  %.017 = phi i1 [ false, %55 ], [ true, %54 ]
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %65

65:                                               ; preds = %63, %61
  %.pn51 = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  %.118 = phi i1 [ %.017, %63 ], [ true, %61 ]
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %66

66:                                               ; preds = %65, %59
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %65 ], [ %60, %59 ]
  %.219 = phi i1 [ %.118, %65 ], [ true, %59 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %67

67:                                               ; preds = %57, %66
  %.pn51.pn.pn = phi { ptr, i32 } [ %.pn51.pn, %66 ], [ %58, %57 ]
  %.320 = phi i1 [ %.219, %66 ], [ true, %57 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br i1 %.320, label %68, label %105

68:                                               ; preds = %.thread62, %67
  %.pn51.pn.pn.pn65 = phi { ptr, i32 } [ %56, %.thread62 ], [ %.pn51.pn.pn, %67 ]
  call void @__cxa_free_exception(ptr %49) #7
  br label %105

69:                                               ; preds = %44
  %70 = call i32 @semget(i32 noundef %46, i32 noundef 1, i32 noundef 1974) #7
  %71 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %70, ptr %71, align 8, !tbaa !5
  %72 = icmp sgt i32 %70, -1
  br i1 %72, label %73, label %76

73:                                               ; preds = %69
  %74 = call i32 (i32, i32, i32, ...) @semctl(i32 noundef %70, i32 noundef 0, i32 noundef 16, ptr nonnull inttoptr (i64 1 to ptr)) #7
  %75 = getelementptr inbounds i8, ptr %0, i64 36
  store i8 1, ptr %75, align 4, !tbaa !15
  br label %104

76:                                               ; preds = %69
  %77 = tail call ptr @__errno_location() #9
  %78 = load i32, ptr %77, align 4, !tbaa !16
  %79 = icmp eq i32 %78, 17
  br i1 %79, label %80, label %84

80:                                               ; preds = %76
  %81 = call i32 @semget(i32 noundef %46, i32 noundef 1, i32 noundef 0) #7
  store i32 %81, ptr %71, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %0, i64 36
  store i8 0, ptr %82, align 4, !tbaa !15
  %83 = icmp sgt i32 %81, -1
  br i1 %83, label %104, label %84

84:                                               ; preds = %76, %80
  %85 = call ptr @__cxa_allocate_exception(i64 56) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %86 unwind label %.thread66

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  invoke void @_ZN4Poco3AnyC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %87 unwind label %92

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  invoke void @_ZN4Poco3AnyC2IiEERKT_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(4) %77)
          to label %88 unwind label %94

88:                                               ; preds = %87
  invoke void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyESA_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %89 unwind label %96

89:                                               ; preds = %88
  invoke void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52) %85, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef 0)
          to label %90 unwind label %98

90:                                               ; preds = %89
  invoke void @__cxa_throw(ptr nonnull %85, ptr nonnull @_ZTIN4Poco15SystemExceptionE, ptr nonnull @_ZN4Poco15SystemExceptionD1Ev) #8
          to label %107 unwind label %98

.thread66:                                        ; preds = %84
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  br label %103

92:                                               ; preds = %86
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %102

94:                                               ; preds = %87
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %101

96:                                               ; preds = %88
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %100

98:                                               ; preds = %90, %89
  %.0 = phi i1 [ false, %90 ], [ true, %89 ]
  %99 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  br label %100

100:                                              ; preds = %98, %96
  %.pn46 = phi { ptr, i32 } [ %99, %98 ], [ %97, %96 ]
  %.1 = phi i1 [ %.0, %98 ], [ true, %96 ]
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  br label %101

101:                                              ; preds = %100, %94
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %100 ], [ %95, %94 ]
  %.2 = phi i1 [ %.1, %100 ], [ true, %94 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @_ZN4Poco3AnyD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %102

102:                                              ; preds = %92, %101
  %.pn46.pn.pn = phi { ptr, i32 } [ %.pn46.pn, %101 ], [ %93, %92 ]
  %.3 = phi i1 [ %.2, %101 ], [ true, %92 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #7
  br i1 %.3, label %103, label %105

103:                                              ; preds = %.thread66, %102
  %.pn46.pn.pn.pn69 = phi { ptr, i32 } [ %91, %.thread66 ], [ %.pn46.pn.pn, %102 ]
  call void @__cxa_free_exception(ptr %85) #7
  br label %105

104:                                              ; preds = %80, %73
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  ret void

105:                                              ; preds = %68, %67, %103, %102, %42, %43, %26
  %.pn51.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %27, %26 ], [ %.pn.pn.pn61, %43 ], [ %.pn.pn, %42 ], [ %.pn51.pn.pn.pn65, %68 ], [ %.pn51.pn.pn, %67 ], [ %.pn46.pn.pn.pn69, %103 ], [ %.pn46.pn.pn, %102 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  br label %106

106:                                              ; preds = %105, %24
  %.pn51.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn51.pn.pn.pn.pn.pn, %105 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  resume { ptr, i32 } %.pn51.pn.pn.pn.pn.pn.pn

107:                                              ; preds = %90, %55, %33
  unreachable
}

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32), 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.start.p0(i64 immarg, ptr nocapture) #1

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #2

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

declare i32 @close(i32 noundef) local_unnamed_addr #4

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

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

declare void @_ZN4Poco15SystemExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_i(ptr noundef nonnull align 8 dereferenceable(52), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN4Poco15SystemExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(52)) unnamed_addr #5

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

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare i32 @ftok(ptr noundef, i32 noundef) local_unnamed_addr #5

declare void @_ZN4Poco6formatERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_3AnyESA_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #6

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

; Function Attrs: nounwind
declare i32 @semget(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @semctl(i32 noundef, i32 noundef, i32 noundef, ...) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree "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 = { "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 = { 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 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn }
attributes #9 = { nounwind willreturn memory(none) }

!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, !13, i64 32}
!6 = !{!"_ZTSN4Poco14NamedMutexImplE", !7, i64 0, !13, i64 32, !14, i64 36}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = !{!6, !14, i64 36}
!16 = !{!13, !13, i64 0}


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