; LLVM IR from NVIDIA/DALI :: dali/core/os/shared_mem.ll (ZN4dali9ShmHandle12CreateHandleEv)

; 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.dali::ShmHandle" = type { %"class.dali::UniqueHandle" }
%"class.dali::UniqueHandle" = type { i32 }
%"class.dali::FileHandle" = type { %"class.dali::UniqueHandle.1" }
%"class.dali::UniqueHandle.1" = type { i32 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@_ZTIN4dali13DALIExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@__const._ZN4dali9ShmHandle12CreateHandleEv.dev_shm_path = external hidden unnamed_addr constant [10 x i8], align 1
@__const._ZN4dali9ShmHandle12CreateHandleEv.run_shm_path = external hidden unnamed_addr constant [10 x i8], align 1
@__const._ZN4dali9ShmHandle12CreateHandleEv.temp_filename_template = external hidden unnamed_addr constant [19 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [78 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali15handle_strerrorEiPcm(i32 noundef, ptr noundef, i64 noundef) #0

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4dali6detail10dir_existsEPKc(ptr noundef) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i8 noundef signext, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #0 align 2

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

declare ptr @__cxa_allocate_exception(i64)

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

; 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 #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4dali13DALIExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

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 #0 align 2

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali9ShmHandle12CreateHandleEv(ptr dead_on_unwind noalias writable sret(%"class.dali::ShmHandle") align 4 %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca [10 x i8], align 1
  %4 = alloca [10 x i8], align 1
  %5 = alloca [19 x i8], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [28 x i8], align 16
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i1, align 1
  %16 = alloca %"class.dali::FileHandle", align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator", align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca i1, align 1
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::__cxx11::basic_string", align 8
  %32 = alloca %"class.std::__cxx11::basic_string", align 8
  %33 = alloca %"class.std::allocator", align 1
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca i1, align 1
  %36 = alloca ptr, align 8
  %37 = alloca i1, align 1
  %38 = alloca %"class.std::__cxx11::basic_string", align 8
  %39 = alloca %"class.std::allocator", align 1
  %40 = alloca i32, align 4
  %41 = alloca %"class.std::__cxx11::basic_string", align 8
  %42 = alloca %"class.std::__cxx11::basic_string", align 8
  %43 = alloca %"class.std::__cxx11::basic_string", align 8
  %44 = alloca %"class.std::allocator", align 1
  %45 = alloca %"class.std::__cxx11::basic_string", align 8
  %46 = alloca i1, align 1
  store ptr %0, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 10, ptr %3) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr align 1 @__const._ZN4dali9ShmHandle12CreateHandleEv.dev_shm_path, i64 10, i1 false)
  call void @llvm.lifetime.start.p0(i64 10, ptr %4) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %4, ptr align 1 @__const._ZN4dali9ShmHandle12CreateHandleEv.run_shm_path, i64 10, i1 false)
  call void @llvm.lifetime.start.p0(i64 19, ptr %5) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const._ZN4dali9ShmHandle12CreateHandleEv.temp_filename_template, i64 19, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 9, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 9, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  store i32 28, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 28, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  store ptr null, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  store i64 0, ptr %11, align 8, !tbaa !11
  %47 = getelementptr inbounds [10 x i8], ptr %3, i64 0, i64 0
  %48 = call noundef zeroext i1 @_ZN4dali6detail10dir_existsEPKc(ptr noundef %47)
  br i1 %48, label %49, label %51

49:                                               ; preds = %1
  %50 = getelementptr inbounds [10 x i8], ptr %3, i64 0, i64 0
  store ptr %50, ptr %10, align 8, !tbaa !9
  store i64 9, ptr %11, align 8, !tbaa !11
  br label %73

51:                                               ; preds = %1
  %52 = getelementptr inbounds [10 x i8], ptr %4, i64 0, i64 0
  %53 = call noundef zeroext i1 @_ZN4dali6detail10dir_existsEPKc(ptr noundef %52)
  br i1 %53, label %54, label %56

54:                                               ; preds = %51
  %55 = getelementptr inbounds [10 x i8], ptr %4, i64 0, i64 0
  store ptr %55, ptr %10, align 8, !tbaa !9
  store i64 9, ptr %11, align 8, !tbaa !11
  br label %72

56:                                               ; preds = %51
  store i1 true, ptr %15, align 1
  %57 = call ptr @__cxa_allocate_exception(i64 16) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #9
  invoke void @_ZN4dali11make_stringIJA43_cA10_cA3_cS2_S3_EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 1 dereferenceable(43) @.str.6, ptr noundef nonnull align 1 dereferenceable(10) %3, ptr noundef nonnull align 1 dereferenceable(3) @.str.7, ptr noundef nonnull align 1 dereferenceable(10) %4, ptr noundef nonnull align 1 dereferenceable(3) @.str.8)
          to label %58 unwind label %60

58:                                               ; preds = %56
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %59 unwind label %64

59:                                               ; preds = %58
  store i1 false, ptr %15, align 1
  invoke void @__cxa_throw(ptr %57, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
          to label %290 unwind label %64

60:                                               ; preds = %56
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %13, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %14, align 4
  br label %68

64:                                               ; preds = %59, %58
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %13, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #9
  br label %68

68:                                               ; preds = %64, %60
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #9
  %69 = load i1, ptr %15, align 1
  br i1 %69, label %70, label %71

70:                                               ; preds = %68
  call void @__cxa_free_exception(ptr %57) #9
  br label %71

71:                                               ; preds = %70, %68
  br label %284

72:                                               ; preds = %54
  br label %73

73:                                               ; preds = %72, %49
  %74 = getelementptr inbounds [28 x i8], ptr %9, i64 0, i64 0
  %75 = load ptr, ptr %10, align 8, !tbaa !9
  %76 = load i64, ptr %11, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %74, ptr align 1 %75, i64 %76, i1 false)
  %77 = getelementptr inbounds [28 x i8], ptr %9, i64 0, i64 0
  %78 = load i64, ptr %11, align 8, !tbaa !11
  %79 = getelementptr inbounds i8, ptr %77, i64 %78
  %80 = getelementptr inbounds [19 x i8], ptr %5, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %79, ptr align 16 %80, i64 19, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %81 = getelementptr inbounds [28 x i8], ptr %9, i64 0, i64 0
  %82 = call i32 @mkstemp(ptr noundef %81)
  call void @_ZN4dali10FileHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef %82)
  br label %83

83:                                               ; preds = %73
  %84 = call noundef i32 @_ZNKR4dali12UniqueHandleIiNS_10FileHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4) %16) #9
  %85 = icmp eq i32 %84, -1
  br i1 %85, label %86, label %137

86:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef 256, i8 noundef signext 0, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %87 unwind label %100

87:                                               ; preds = %86
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  %88 = call ptr @__errno_location() #11
  %89 = load i32, ptr %88, align 4, !tbaa !5
  store i32 %89, ptr %19, align 4, !tbaa !5
  %90 = load i32, ptr %19, align 4, !tbaa !5
  %91 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef 0)
          to label %92 unwind label %104

92:                                               ; preds = %87
  %93 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @_ZN4dali15handle_strerrorEiPcm(i32 noundef %90, ptr noundef %91, i64 noundef %93)
  store i1 true, ptr %25, align 1
  %94 = call ptr @__cxa_allocate_exception(i64 80) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #9
  invoke void @_ZN4dali11make_stringIJA9_cA8_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %21, ptr noundef nonnull align 1 dereferenceable(9) @.str, ptr noundef nonnull align 1 dereferenceable(8) @.str.9, ptr noundef nonnull align 1 dereferenceable(10) @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 1 dereferenceable(2) @.str.3, ptr noundef nonnull align 1 dereferenceable(32) @.str.10)
          to label %95 unwind label %108

95:                                               ; preds = %92
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %20, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %96 unwind label %112

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %97 unwind label %116

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #9
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24)
          to label %98 unwind label %120

98:                                               ; preds = %97
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %94, ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %22, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %99 unwind label %124

99:                                               ; preds = %98
  store i1 false, ptr %25, align 1
  invoke void @__cxa_throw(ptr %94, ptr @_ZTIN4dali13DALIExceptionE, ptr @_ZN4dali13DALIExceptionD2Ev) #10
          to label %290 unwind label %124

100:                                              ; preds = %86
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %13, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  br label %136

104:                                              ; preds = %87
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %13, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %14, align 4
  br label %135

108:                                              ; preds = %92
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %13, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %14, align 4
  br label %131

112:                                              ; preds = %95
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %13, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %14, align 4
  br label %130

116:                                              ; preds = %96
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %13, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %14, align 4
  br label %129

120:                                              ; preds = %97
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %13, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %14, align 4
  br label %128

124:                                              ; preds = %99, %98
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %13, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #9
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  br label %129

129:                                              ; preds = %128, %116
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #9
  br label %130

130:                                              ; preds = %129, %112
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #9
  br label %131

131:                                              ; preds = %130, %108
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #9
  %132 = load i1, ptr %25, align 1
  br i1 %132, label %133, label %134

133:                                              ; preds = %131
  call void @__cxa_free_exception(ptr %94) #9
  br label %134

134:                                              ; preds = %133, %131
  br label %135

135:                                              ; preds = %134, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  br label %136

136:                                              ; preds = %135, %100
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  br label %283

137:                                              ; preds = %83
  br label %138

138:                                              ; preds = %137
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #9
  %141 = getelementptr inbounds [28 x i8], ptr %9, i64 0, i64 0
  %142 = call i32 @unlink(ptr noundef %141) #9
  store i32 %142, ptr %26, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %140
  %144 = load i32, ptr %26, align 4, !tbaa !5
  %145 = icmp eq i32 %144, -1
  br i1 %145, label %146, label %197

146:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, i64 noundef 256, i8 noundef signext 0, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %147 unwind label %160

147:                                              ; preds = %146
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #9
  %148 = call ptr @__errno_location() #11
  %149 = load i32, ptr %148, align 4, !tbaa !5
  store i32 %149, ptr %29, align 4, !tbaa !5
  %150 = load i32, ptr %29, align 4, !tbaa !5
  %151 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %27, i64 noundef 0)
          to label %152 unwind label %164

152:                                              ; preds = %147
  %153 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  call void @_ZN4dali15handle_strerrorEiPcm(i32 noundef %150, ptr noundef %151, i64 noundef %153)
  store i1 true, ptr %35, align 1
  %154 = call ptr @__cxa_allocate_exception(i64 80) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %30) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %31) #9
  invoke void @_ZN4dali11make_stringIJA9_cA18_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %31, ptr noundef nonnull align 1 dereferenceable(9) @.str, ptr noundef nonnull align 1 dereferenceable(18) @.str.12, ptr noundef nonnull align 1 dereferenceable(10) @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 1 dereferenceable(2) @.str.3, ptr noundef nonnull align 1 dereferenceable(32) @.str.13)
          to label %155 unwind label %168

155:                                              ; preds = %152
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %30, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %156 unwind label %172

156:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 1, ptr %33) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %33)
          to label %157 unwind label %176

157:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #9
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %34)
          to label %158 unwind label %180

158:                                              ; preds = %157
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %154, ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef %32, ptr noundef nonnull align 8 dereferenceable(32) %34)
          to label %159 unwind label %184

159:                                              ; preds = %158
  store i1 false, ptr %35, align 1
  invoke void @__cxa_throw(ptr %154, ptr @_ZTIN4dali13DALIExceptionE, ptr @_ZN4dali13DALIExceptionD2Ev) #10
          to label %290 unwind label %184

160:                                              ; preds = %146
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %13, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #9
  br label %196

164:                                              ; preds = %147
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %13, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %14, align 4
  br label %195

168:                                              ; preds = %152
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %13, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %14, align 4
  br label %191

172:                                              ; preds = %155
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %13, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %14, align 4
  br label %190

176:                                              ; preds = %156
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %13, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %14, align 4
  br label %189

180:                                              ; preds = %157
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %13, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %14, align 4
  br label %188

184:                                              ; preds = %159, %158
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %13, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #9
  br label %188

188:                                              ; preds = %184, %180
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %32) #9
  br label %189

189:                                              ; preds = %188, %176
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %33) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %33) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #9
  br label %190

190:                                              ; preds = %189, %172
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  br label %191

191:                                              ; preds = %190, %168
  call void @llvm.lifetime.end.p0(i64 32, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %30) #9
  %192 = load i1, ptr %35, align 1
  br i1 %192, label %193, label %194

193:                                              ; preds = %191
  call void @__cxa_free_exception(ptr %154) #9
  br label %194

194:                                              ; preds = %193, %191
  br label %195

195:                                              ; preds = %194, %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #9
  br label %196

196:                                              ; preds = %195, %160
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %283

197:                                              ; preds = %143
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #9
  br label %200

200:                                              ; preds = %199
  br label %201

201:                                              ; preds = %200
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  %202 = getelementptr inbounds [28 x i8], ptr %9, i64 0, i64 0
  %203 = load i64, ptr %11, align 8, !tbaa !11
  %204 = getelementptr inbounds i8, ptr %202, i64 %203
  store ptr %204, ptr %36, align 8, !tbaa !9
  store i1 false, ptr %37, align 1
  %205 = load ptr, ptr %36, align 8, !tbaa !9
  %206 = invoke i32 @shm_open(ptr noundef %205, i32 noundef 194, i32 noundef 384)
          to label %207 unwind label %226

207:                                              ; preds = %201
  invoke void @_ZN4dali9ShmHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4) %0, i32 noundef %206)
          to label %208 unwind label %226

208:                                              ; preds = %207
  br label %209

209:                                              ; preds = %208
  %210 = call noundef i32 @_ZNKR4dali12UniqueHandleIiNS_9ShmHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4) %0) #9
  %211 = icmp eq i32 %210, -1
  br i1 %211, label %212, label %267

212:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %39) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef 256, i8 noundef signext 0, ptr noundef nonnull align 1 dereferenceable(1) %39)
          to label %213 unwind label %230

213:                                              ; preds = %212
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #9
  %214 = call ptr @__errno_location() #11
  %215 = load i32, ptr %214, align 4, !tbaa !5
  store i32 %215, ptr %40, align 4, !tbaa !5
  %216 = load i32, ptr %40, align 4, !tbaa !5
  %217 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %38, i64 noundef 0)
          to label %218 unwind label %234

218:                                              ; preds = %213
  %219 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  call void @_ZN4dali15handle_strerrorEiPcm(i32 noundef %216, ptr noundef %217, i64 noundef %219)
  store i1 true, ptr %46, align 1
  %220 = call ptr @__cxa_allocate_exception(i64 80) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %41) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %42) #9
  invoke void @_ZN4dali11make_stringIJA9_cS1_A10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA1_cEEES8_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %42, ptr noundef nonnull align 1 dereferenceable(9) @.str, ptr noundef nonnull align 1 dereferenceable(9) @.str.15, ptr noundef nonnull align 1 dereferenceable(10) @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 1 dereferenceable(2) @.str.3, ptr noundef nonnull align 1 dereferenceable(1) @.str.4)
          to label %221 unwind label %238

221:                                              ; preds = %218
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %41, ptr noundef nonnull align 8 dereferenceable(32) %42)
          to label %222 unwind label %242

222:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 1, ptr %44) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %44)
          to label %223 unwind label %246

223:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 32, ptr %45) #9
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %45)
          to label %224 unwind label %250

224:                                              ; preds = %223
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %220, ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef %43, ptr noundef nonnull align 8 dereferenceable(32) %45)
          to label %225 unwind label %254

225:                                              ; preds = %224
  store i1 false, ptr %46, align 1
  invoke void @__cxa_throw(ptr %220, ptr @_ZTIN4dali13DALIExceptionE, ptr @_ZN4dali13DALIExceptionD2Ev) #10
          to label %290 unwind label %254

226:                                              ; preds = %207, %201
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %13, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %14, align 4
  br label %282

230:                                              ; preds = %212
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %13, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %14, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %39) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %39) #9
  br label %266

234:                                              ; preds = %213
  %235 = landingpad { ptr, i32 }
          cleanup
  %236 = extractvalue { ptr, i32 } %235, 0
  store ptr %236, ptr %13, align 8
  %237 = extractvalue { ptr, i32 } %235, 1
  store i32 %237, ptr %14, align 4
  br label %265

238:                                              ; preds = %218
  %239 = landingpad { ptr, i32 }
          cleanup
  %240 = extractvalue { ptr, i32 } %239, 0
  store ptr %240, ptr %13, align 8
  %241 = extractvalue { ptr, i32 } %239, 1
  store i32 %241, ptr %14, align 4
  br label %261

242:                                              ; preds = %221
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %13, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %14, align 4
  br label %260

246:                                              ; preds = %222
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %13, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %14, align 4
  br label %259

250:                                              ; preds = %223
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %13, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %14, align 4
  br label %258

254:                                              ; preds = %225, %224
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %13, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %45) #9
  br label %258

258:                                              ; preds = %254, %250
  call void @llvm.lifetime.end.p0(i64 32, ptr %45) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %43) #9
  br label %259

259:                                              ; preds = %258, %246
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %44) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %44) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %41) #9
  br label %260

260:                                              ; preds = %259, %242
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #9
  br label %261

261:                                              ; preds = %260, %238
  call void @llvm.lifetime.end.p0(i64 32, ptr %42) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %41) #9
  %262 = load i1, ptr %46, align 1
  br i1 %262, label %263, label %264

263:                                              ; preds = %261
  call void @__cxa_free_exception(ptr %220) #9
  br label %264

264:                                              ; preds = %263, %261
  br label %265

265:                                              ; preds = %264, %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #9
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %38) #9
  br label %266

266:                                              ; preds = %265, %230
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #9
  br label %281

267:                                              ; preds = %209
  br label %268

268:                                              ; preds = %267
  br label %269

269:                                              ; preds = %268
  invoke void @_ZN4dali12UniqueHandleIiNS_10FileHandleEE5resetEv(ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %270 unwind label %275

270:                                              ; preds = %269
  %271 = load ptr, ptr %36, align 8, !tbaa !9
  %272 = invoke i32 @shm_unlink(ptr noundef %271)
          to label %273 unwind label %275

273:                                              ; preds = %270
  store i1 true, ptr %37, align 1
  %274 = load i1, ptr %37, align 1
  br i1 %274, label %280, label %279

275:                                              ; preds = %270, %269
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %13, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %14, align 4
  br label %281

279:                                              ; preds = %273
  call void @_ZN4dali12UniqueHandleIiNS_9ShmHandleEED2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0) #9
  br label %280

280:                                              ; preds = %279, %273
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  call void @_ZN4dali12UniqueHandleIiNS_10FileHandleEED2Ev(ptr noundef nonnull align 4 dereferenceable(4) %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 28, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 19, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 10, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 10, ptr %3) #9
  ret void

281:                                              ; preds = %275, %266
  call void @_ZN4dali12UniqueHandleIiNS_9ShmHandleEED2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0) #9
  br label %282

282:                                              ; preds = %281, %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  br label %283

283:                                              ; preds = %282, %196, %136
  call void @_ZN4dali12UniqueHandleIiNS_10FileHandleEED2Ev(ptr noundef nonnull align 4 dereferenceable(4) %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  br label %284

284:                                              ; preds = %283, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 28, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 19, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 10, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 10, ptr %3) #9
  br label %285

285:                                              ; preds = %284
  %286 = load ptr, ptr %13, align 8
  %287 = load i32, ptr %14, align 4
  %288 = insertvalue { ptr, i32 } poison, ptr %286, 0
  %289 = insertvalue { ptr, i32 } %288, i32 %287, 1
  resume { ptr, i32 } %289

290:                                              ; preds = %225, %159, %99, %59
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA43_cA10_cA3_cS2_S3_EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(43), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 1 dereferenceable(3), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 1 dereferenceable(3)) #3

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7

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

declare i32 @mkstemp(ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10FileHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKR4dali12UniqueHandleIiNS_10FileHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA9_cA8_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 1 dereferenceable(32)) #3

; Function Attrs: nounwind
declare i32 @unlink(ptr noundef) #8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA9_cA18_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(18), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 1 dereferenceable(32)) #3

declare i32 @shm_open(ptr noundef, i32 noundef, i32 noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali9ShmHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKR4dali12UniqueHandleIiNS_9ShmHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA9_cS1_A10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA1_cEEES8_DpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 1 dereferenceable(1)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali12UniqueHandleIiNS_10FileHandleEE5resetEv(ptr noundef nonnull align 4 dereferenceable(4)) #5 align 2

declare i32 @shm_unlink(ptr noundef) #7

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind "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 }
attributes #10 = { noreturn }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}


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

%"class.std::__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.dali::ShmHandle" = type { %"class.dali::UniqueHandle" }
%"class.dali::UniqueHandle" = type { i32 }
%"class.dali::FileHandle" = type { %"class.dali::UniqueHandle.1" }
%"class.dali::UniqueHandle.1" = type { i32 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@_ZTIN4dali13DALIExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@__const._ZN4dali9ShmHandle12CreateHandleEv.dev_shm_path = external hidden unnamed_addr constant [10 x i8], align 1
@__const._ZN4dali9ShmHandle12CreateHandleEv.run_shm_path = external hidden unnamed_addr constant [10 x i8], align 1
@__const._ZN4dali9ShmHandle12CreateHandleEv.temp_filename_template = external hidden unnamed_addr constant [19 x i8], align 16
@.str.6 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [78 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali15handle_strerrorEiPcm(i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4dali6detail10dir_existsEPKc(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef, i8 noundef signext, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #0 align 2

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

; 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 #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4dali13DALIExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #6 align 2

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 #0 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali9ShmHandle12CreateHandleEv(ptr dead_on_unwind noalias writable sret(%"class.dali::ShmHandle") align 4 %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca [10 x i8], align 1
  %3 = alloca [10 x i8], align 1
  %4 = alloca [28 x i8], align 16
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.dali::FileHandle", align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %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.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator", align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %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.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %2) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %2, ptr noundef nonnull align 1 dereferenceable(10) @__const._ZN4dali9ShmHandle12CreateHandleEv.dev_shm_path, i64 10, i1 false)
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %3) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %3, ptr noundef nonnull align 1 dereferenceable(10) @__const._ZN4dali9ShmHandle12CreateHandleEv.run_shm_path, i64 10, i1 false)
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %4) #10
  %28 = call noundef zeroext i1 @_ZN4dali6detail10dir_existsEPKc(ptr noundef nonnull %2)
  br i1 %28, label %40, label %29

29:                                               ; preds = %1
  %30 = call noundef zeroext i1 @_ZN4dali6detail10dir_existsEPKc(ptr noundef nonnull %3)
  br i1 %30, label %40, label %31

31:                                               ; preds = %29
  %32 = call ptr @__cxa_allocate_exception(i64 16) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  invoke void @_ZN4dali11make_stringIJA43_cA10_cA3_cS2_S3_EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull align 1 dereferenceable(43) @.str.6, ptr noundef nonnull align 1 dereferenceable(10) %2, ptr noundef nonnull align 1 dereferenceable(3) @.str.7, ptr noundef nonnull align 1 dereferenceable(10) %3, ptr noundef nonnull align 1 dereferenceable(3) @.str.8)
          to label %33 unwind label %.thread

33:                                               ; preds = %31
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %35 unwind label %.thread81

.thread81:                                        ; preds = %33
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  br label %39

35:                                               ; preds = %33
  invoke void @__cxa_throw(ptr nonnull %32, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #11
          to label %146 unwind label %37

.thread:                                          ; preds = %31
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  br label %39

37:                                               ; preds = %35
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  br label %145

39:                                               ; preds = %.thread81, %.thread
  %.pn80 = phi { ptr, i32 } [ %36, %.thread ], [ %34, %.thread81 ]
  call void @__cxa_free_exception(ptr %32) #10
  br label %145

40:                                               ; preds = %29, %1
  %.016 = phi ptr [ %2, %1 ], [ %3, %29 ]
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(9) %4, ptr noundef nonnull align 1 dereferenceable(9) %.016, i64 9, i1 false)
  %41 = getelementptr inbounds i8, ptr %4, i64 9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(19) %41, ptr noundef nonnull align 16 dereferenceable(19) @__const._ZN4dali9ShmHandle12CreateHandleEv.temp_filename_template, i64 19, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #10
  %42 = call i32 @mkstemp(ptr noundef nonnull %4)
  call void @_ZN4dali10FileHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %42)
  %43 = call noundef i32 @_ZNKR4dali12UniqueHandleIiNS_10FileHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4) %6) #10
  %44 = icmp eq i32 %43, -1
  br i1 %44, label %45, label %72

45:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 256, i8 noundef signext 0, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %46 unwind label %57

46:                                               ; preds = %45
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  %47 = tail call ptr @__errno_location() #12
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 0)
  %50 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @_ZN4dali15handle_strerrorEiPcm(i32 noundef %48, ptr noundef nonnull %49, i64 noundef %50)
  %51 = call ptr @__cxa_allocate_exception(i64 80) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #10
  invoke void @_ZN4dali11make_stringIJA9_cA8_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 1 dereferenceable(9) @.str, ptr noundef nonnull align 1 dereferenceable(8) @.str.9, ptr noundef nonnull align 1 dereferenceable(10) @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 1 dereferenceable(2) @.str.3, ptr noundef nonnull align 1 dereferenceable(32) @.str.10)
          to label %52 unwind label %.thread83

52:                                               ; preds = %46
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %53 unwind label %.thread88

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %54 unwind label %61

54:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #10
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13)
          to label %55 unwind label %63

55:                                               ; preds = %54
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %51, ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull %11, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %56 unwind label %65

56:                                               ; preds = %55
  invoke void @__cxa_throw(ptr nonnull %51, ptr nonnull @_ZTIN4dali13DALIExceptionE, ptr nonnull @_ZN4dali13DALIExceptionD2Ev) #11
          to label %146 unwind label %65

57:                                               ; preds = %45
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #10
  br label %71

.thread83:                                        ; preds = %46
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  br label %69

.thread88:                                        ; preds = %52
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  br label %69

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

63:                                               ; preds = %54
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %67

65:                                               ; preds = %56, %55
  %.048 = phi i1 [ false, %56 ], [ true, %55 ]
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  br label %67

67:                                               ; preds = %65, %63
  %.149 = phi i1 [ %.048, %65 ], [ true, %63 ]
  %.pn70 = phi { ptr, i32 } [ %66, %65 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #10
  br label %68

68:                                               ; preds = %61, %67
  %.250 = phi i1 [ %.149, %67 ], [ true, %61 ]
  %.pn70.pn = phi { ptr, i32 } [ %.pn70, %67 ], [ %62, %61 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  br i1 %.250, label %69, label %70

69:                                               ; preds = %.thread88, %.thread83, %68
  %.pn70.pn.pn.pn87 = phi { ptr, i32 } [ %59, %.thread83 ], [ %.pn70.pn, %68 ], [ %60, %.thread88 ]
  call void @__cxa_free_exception(ptr %51) #10
  br label %70

70:                                               ; preds = %68, %69
  %.pn70.pn.pn.pn86 = phi { ptr, i32 } [ %.pn70.pn, %68 ], [ %.pn70.pn.pn.pn87, %69 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %71

71:                                               ; preds = %70, %57
  %.pn70.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn70.pn.pn.pn86, %70 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  br label %144

72:                                               ; preds = %40
  %73 = call i32 @unlink(ptr noundef nonnull %4) #10
  %74 = icmp eq i32 %73, -1
  br i1 %74, label %75, label %102

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef 256, i8 noundef signext 0, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %76 unwind label %87

76:                                               ; preds = %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #10
  %77 = tail call ptr @__errno_location() #12
  %78 = load i32, ptr %77, align 4, !tbaa !5
  %79 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %14, i64 noundef 0)
  %80 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  call void @_ZN4dali15handle_strerrorEiPcm(i32 noundef %78, ptr noundef nonnull %79, i64 noundef %80)
  %81 = call ptr @__cxa_allocate_exception(i64 80) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #10
  invoke void @_ZN4dali11make_stringIJA9_cA18_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef nonnull align 1 dereferenceable(9) @.str, ptr noundef nonnull align 1 dereferenceable(18) @.str.12, ptr noundef nonnull align 1 dereferenceable(10) @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 1 dereferenceable(2) @.str.3, ptr noundef nonnull align 1 dereferenceable(32) @.str.13)
          to label %82 unwind label %.thread91

82:                                               ; preds = %76
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %83 unwind label %.thread96

83:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %19) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %84 unwind label %91

84:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %20) #10
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %20)
          to label %85 unwind label %93

85:                                               ; preds = %84
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %81, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull %18, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %86 unwind label %95

86:                                               ; preds = %85
  invoke void @__cxa_throw(ptr nonnull %81, ptr nonnull @_ZTIN4dali13DALIExceptionE, ptr nonnull @_ZN4dali13DALIExceptionD2Ev) #11
          to label %146 unwind label %95

87:                                               ; preds = %75
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #10
  br label %101

.thread91:                                        ; preds = %76
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #10
  br label %99

.thread96:                                        ; preds = %82
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #10
  br label %99

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

93:                                               ; preds = %84
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %86, %85
  %.018 = phi i1 [ false, %86 ], [ true, %85 ]
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #10
  br label %97

97:                                               ; preds = %95, %93
  %.pn64 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  %.119 = phi i1 [ %.018, %95 ], [ true, %93 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %20) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #10
  br label %98

98:                                               ; preds = %91, %97
  %.pn64.pn = phi { ptr, i32 } [ %.pn64, %97 ], [ %92, %91 ]
  %.220 = phi i1 [ %.119, %97 ], [ true, %91 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %19) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #10
  br i1 %.220, label %99, label %100

99:                                               ; preds = %.thread96, %.thread91, %98
  %.pn64.pn.pn.pn95 = phi { ptr, i32 } [ %89, %.thread91 ], [ %.pn64.pn, %98 ], [ %90, %.thread96 ]
  call void @__cxa_free_exception(ptr %81) #10
  br label %100

100:                                              ; preds = %98, %99
  %.pn64.pn.pn.pn94 = phi { ptr, i32 } [ %.pn64.pn, %98 ], [ %.pn64.pn.pn.pn95, %99 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #10
  br label %101

101:                                              ; preds = %100, %87
  %.pn64.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn64.pn.pn.pn94, %100 ], [ %88, %87 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #10
  br label %144

102:                                              ; preds = %72
  %103 = invoke i32 @shm_open(ptr noundef nonnull %41, i32 noundef 194, i32 noundef 384)
          to label %104 unwind label %120

104:                                              ; preds = %102
  invoke void @_ZN4dali9ShmHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4) %0, i32 noundef %103)
          to label %105 unwind label %120

105:                                              ; preds = %104
  %106 = call noundef i32 @_ZNKR4dali12UniqueHandleIiNS_9ShmHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4) %0) #10
  %107 = icmp eq i32 %106, -1
  br i1 %107, label %108, label %137

108:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %22) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEmcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, i64 noundef 256, i8 noundef signext 0, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %109 unwind label %122

109:                                              ; preds = %108
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #10
  %110 = tail call ptr @__errno_location() #12
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %21, i64 noundef 0)
  %113 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  call void @_ZN4dali15handle_strerrorEiPcm(i32 noundef %111, ptr noundef nonnull %112, i64 noundef %113)
  %114 = call ptr @__cxa_allocate_exception(i64 80) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %23) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #10
  invoke void @_ZN4dali11make_stringIJA9_cS1_A10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA1_cEEES8_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef nonnull align 1 dereferenceable(9) @.str, ptr noundef nonnull align 1 dereferenceable(9) @.str.15, ptr noundef nonnull align 1 dereferenceable(10) @.str.2, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 1 dereferenceable(2) @.str.3, ptr noundef nonnull align 1 dereferenceable(1) @.str.4)
          to label %115 unwind label %.thread99

115:                                              ; preds = %109
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %116 unwind label %.thread104

116:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %26) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %117 unwind label %126

117:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %27) #10
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %27)
          to label %118 unwind label %128

118:                                              ; preds = %117
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %114, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull %25, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %119 unwind label %130

119:                                              ; preds = %118
  invoke void @__cxa_throw(ptr nonnull %114, ptr nonnull @_ZTIN4dali13DALIExceptionE, ptr nonnull @_ZN4dali13DALIExceptionD2Ev) #11
          to label %146 unwind label %130

120:                                              ; preds = %104, %102
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %144

122:                                              ; preds = %108
  %123 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %22) #10
  br label %136

.thread99:                                        ; preds = %109
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #10
  br label %134

.thread104:                                       ; preds = %115
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #10
  br label %134

126:                                              ; preds = %116
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %133

128:                                              ; preds = %117
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %132

130:                                              ; preds = %119, %118
  %.0 = phi i1 [ false, %119 ], [ true, %118 ]
  %131 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #10
  br label %132

132:                                              ; preds = %130, %128
  %.pn56 = phi { ptr, i32 } [ %131, %130 ], [ %129, %128 ]
  %.1 = phi i1 [ %.0, %130 ], [ true, %128 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #10
  br label %133

133:                                              ; preds = %126, %132
  %.pn56.pn = phi { ptr, i32 } [ %.pn56, %132 ], [ %127, %126 ]
  %.2 = phi i1 [ %.1, %132 ], [ true, %126 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %26) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #10
  br i1 %.2, label %134, label %135

134:                                              ; preds = %.thread104, %.thread99, %133
  %.pn56.pn.pn.pn103 = phi { ptr, i32 } [ %124, %.thread99 ], [ %.pn56.pn, %133 ], [ %125, %.thread104 ]
  call void @__cxa_free_exception(ptr %114) #10
  br label %135

135:                                              ; preds = %133, %134
  %.pn56.pn.pn.pn102 = phi { ptr, i32 } [ %.pn56.pn, %133 ], [ %.pn56.pn.pn.pn103, %134 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #10
  br label %136

136:                                              ; preds = %135, %122
  %.pn56.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn56.pn.pn.pn102, %135 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #10
  br label %143

137:                                              ; preds = %105
  invoke void @_ZN4dali12UniqueHandleIiNS_10FileHandleEE5resetEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %138 unwind label %140

138:                                              ; preds = %137
  %139 = invoke i32 @shm_unlink(ptr noundef nonnull %41)
          to label %142 unwind label %140

140:                                              ; preds = %138, %137
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %143

142:                                              ; preds = %138
  call void @_ZN4dali12UniqueHandleIiNS_10FileHandleEED2Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %2) #10
  ret void

143:                                              ; preds = %140, %136
  %.pn56.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn56.pn.pn.pn.pn, %136 ], [ %141, %140 ]
  call void @_ZN4dali12UniqueHandleIiNS_9ShmHandleEED2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0) #10
  br label %144

144:                                              ; preds = %120, %143, %101, %71
  %.pn70.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn70.pn.pn.pn.pn, %71 ], [ %.pn64.pn.pn.pn.pn, %101 ], [ %.pn56.pn.pn.pn.pn.pn, %143 ], [ %121, %120 ]
  call void @_ZN4dali12UniqueHandleIiNS_10FileHandleEED2Ev(ptr noundef nonnull align 4 dereferenceable(4) %6) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #10
  br label %145

145:                                              ; preds = %37, %39, %144
  %.pn70.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn70.pn.pn.pn.pn.pn, %144 ], [ %.pn80, %39 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn70.pn.pn.pn.pn.pn.pn

146:                                              ; preds = %119, %86, %56, %35
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA43_cA10_cA3_cS2_S3_EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(43), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 1 dereferenceable(3), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #3

declare void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #7

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

declare i32 @mkstemp(ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10FileHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKR4dali12UniqueHandleIiNS_10FileHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA9_cA8_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @unlink(ptr nocapture noundef readonly) local_unnamed_addr #9

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA9_cA18_cA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA32_cEEES9_DpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(18), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 1 dereferenceable(32)) local_unnamed_addr #3

declare i32 @shm_open(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali9ShmHandleCI2NS_12UniqueHandleIiS0_EEEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNKR4dali12UniqueHandleIiNS_9ShmHandleEEcviEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11make_stringIJA9_cS1_A10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA2_cA1_cEEES8_DpRKT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(2), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali12UniqueHandleIiNS_10FileHandleEE5resetEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5 align 2

declare i32 @shm_unlink(ptr noundef) local_unnamed_addr #7

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

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

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


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