; LLVM IR from XiaoMi/mace :: mace/runtimes/opencl/core (opencl_wrapper)

; 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.mace::logging_internal::LatencyLogger" = type { i32, %"class.std::__cxx11::basic_string", i64 }
%"class.std::allocator.0" = type { i8 }
%"class.mace::runtime::OpenCLLibrary" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str.42 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4mace7runtime13OpenCLLibrary3GetEv() #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local ptr @clEnqueueMapImage(ptr noundef %0, ptr noundef %1, i32 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) #0 personality ptr @__gxx_personality_v0 {
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.mace::logging_internal::LatencyLogger", align 8
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator.0", align 1
  %30 = alloca i1, align 1
  %31 = alloca i1, align 1
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store ptr %0, ptr %14, align 8, !tbaa !5
  store ptr %1, ptr %15, align 8, !tbaa !5
  store i32 %2, ptr %16, align 4, !tbaa !9
  store i64 %3, ptr %17, align 8, !tbaa !11
  store ptr %4, ptr %18, align 8, !tbaa !5
  store ptr %5, ptr %19, align 8, !tbaa !5
  store ptr %6, ptr %20, align 8, !tbaa !5
  store ptr %7, ptr %21, align 8, !tbaa !5
  store i32 %8, ptr %22, align 4, !tbaa !9
  store ptr %9, ptr %23, align 8, !tbaa !5
  store ptr %10, ptr %24, align 8, !tbaa !5
  store ptr %11, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %35 = call noundef ptr @_ZN4mace7runtime13OpenCLLibrary3GetEv()
  %36 = getelementptr inbounds %"class.mace::runtime::OpenCLLibrary", ptr %35, i32 0, i32 24
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  store ptr %37, ptr %26, align 8, !tbaa !5
  %38 = load ptr, ptr %26, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %40, label %88

40:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 48, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #4
  %41 = call noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef 3)
  store i1 false, ptr %30, align 1
  store i1 false, ptr %31, align 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  call void @_ZN4mace10MakeStringB5cxx11EPKc(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %28, ptr noundef @.str.42)
  br label %45

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #4
  store i1 true, ptr %30, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  store i1 true, ptr %31, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @.str.67, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %44 unwind label %68

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44, %42
  invoke void @_ZN4mace16logging_internal13LatencyLoggerC2EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %27, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) %28)
          to label %46 unwind label %72

46:                                               ; preds = %45
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  %47 = load i1, ptr %31, align 1
  br i1 %47, label %48, label %49

48:                                               ; preds = %46
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  br label %49

49:                                               ; preds = %48, %46
  %50 = load i1, ptr %30, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #4
  br label %52

52:                                               ; preds = %51, %49
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #4
  %53 = load ptr, ptr %26, align 8, !tbaa !5
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  %55 = load ptr, ptr %15, align 8, !tbaa !5
  %56 = load i32, ptr %16, align 4, !tbaa !9
  %57 = load i64, ptr %17, align 8, !tbaa !11
  %58 = load ptr, ptr %18, align 8, !tbaa !5
  %59 = load ptr, ptr %19, align 8, !tbaa !5
  %60 = load ptr, ptr %20, align 8, !tbaa !5
  %61 = load ptr, ptr %21, align 8, !tbaa !5
  %62 = load i32, ptr %22, align 4, !tbaa !9
  %63 = load ptr, ptr %23, align 8, !tbaa !5
  %64 = load ptr, ptr %24, align 8, !tbaa !5
  %65 = load ptr, ptr %25, align 8, !tbaa !5
  %66 = invoke noundef ptr %53(ptr noundef %54, ptr noundef %55, i32 noundef %56, i64 noundef %57, ptr noundef %58, ptr noundef %59, ptr noundef %60, ptr noundef %61, i32 noundef %62, ptr noundef %63, ptr noundef %64, ptr noundef %65)
          to label %67 unwind label %83

67:                                               ; preds = %52
  store ptr %66, ptr %13, align 8
  store i32 1, ptr %34, align 4
  call void @_ZN4mace16logging_internal13LatencyLoggerD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #4
  br label %94

68:                                               ; preds = %43
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %32, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %33, align 4
  br label %76

72:                                               ; preds = %45
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %32, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %33, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #4
  br label %76

76:                                               ; preds = %72, %68
  %77 = load i1, ptr %31, align 1
  br i1 %77, label %78, label %79

78:                                               ; preds = %76
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #4
  br label %79

79:                                               ; preds = %78, %76
  %80 = load i1, ptr %30, align 1
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #4
  br label %82

82:                                               ; preds = %81, %79
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #4
  br label %87

83:                                               ; preds = %52
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %32, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %33, align 4
  call void @_ZN4mace16logging_internal13LatencyLoggerD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #4
  br label %87

87:                                               ; preds = %83, %82
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  br label %96

88:                                               ; preds = %12
  %89 = load ptr, ptr %25, align 8, !tbaa !5
  %90 = icmp ne ptr %89, null
  br i1 %90, label %91, label %93

91:                                               ; preds = %88
  %92 = load ptr, ptr %25, align 8, !tbaa !5
  store i32 -32, ptr %92, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %91, %88
  store ptr null, ptr %13, align 8
  store i32 1, ptr %34, align 4
  br label %94

94:                                               ; preds = %93, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  %95 = load ptr, ptr %13, align 8
  ret ptr %95

96:                                               ; preds = %87
  %97 = load ptr, ptr %32, align 8
  %98 = load i32, ptr %33, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 192}
!14 = !{!"_ZTSN4mace7runtime13OpenCLLibraryE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392}


; 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.mace::logging_internal::LatencyLogger" = type { i32, %"class.std::__cxx11::basic_string", i64 }
%"class.std::allocator.0" = type { i8 }

@.str.42 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN4mace7runtime13OpenCLLibrary3GetEv() local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @clEnqueueMapImage(ptr noundef %0, ptr noundef %1, i32 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %13 = alloca %"class.mace::logging_internal::LatencyLogger", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = tail call noundef ptr @_ZN4mace7runtime13OpenCLLibrary3GetEv()
  %17 = getelementptr inbounds i8, ptr %16, i64 192
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %.not = icmp eq ptr %18, null
  br i1 %.not, label %35, label %19

19:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #4
  %20 = tail call noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef 3)
  br i1 %20, label %21, label %22

21:                                               ; preds = %19
  call void @_ZN4mace10MakeStringB5cxx11EPKc(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull @.str.42)
  br label %23

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.67, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %23 unwind label %.thread

23:                                               ; preds = %22, %21
  invoke void @_ZN4mace16logging_internal13LatencyLoggerC2EiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(48) %13, i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %24 unwind label %29

24:                                               ; preds = %23
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br i1 %20, label %.critedge, label %25

25:                                               ; preds = %24
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  br label %.critedge

.critedge:                                        ; preds = %24, %25
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  %26 = invoke noundef ptr %18(ptr noundef %0, ptr noundef %1, i32 noundef %2, i64 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11)
          to label %27 unwind label %32

27:                                               ; preds = %.critedge
  call void @_ZN4mace16logging_internal13LatencyLoggerD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %13) #4
  br label %37

.thread:                                          ; preds = %22
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %31

29:                                               ; preds = %23
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #4
  br i1 %20, label %.critedge36, label %31

31:                                               ; preds = %.thread, %29
  %.pn40 = phi { ptr, i32 } [ %28, %.thread ], [ %30, %29 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  br label %.critedge36

.critedge36:                                      ; preds = %29, %31
  %.pn39 = phi { ptr, i32 } [ %30, %29 ], [ %.pn40, %31 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #4
  br label %34

32:                                               ; preds = %.critedge
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4mace16logging_internal13LatencyLoggerD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #4
  br label %34

34:                                               ; preds = %32, %.critedge36
  %.pn33 = phi { ptr, i32 } [ %33, %32 ], [ %.pn39, %.critedge36 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %13) #4
  resume { ptr, i32 } %.pn33

35:                                               ; preds = %12
  %.not31 = icmp eq ptr %11, null
  br i1 %.not31, label %37, label %36

36:                                               ; preds = %35
  store i32 -32, ptr %11, align 4, !tbaa !10
  br label %37

37:                                               ; preds = %35, %36, %27
  %.028 = phi ptr [ %26, %27 ], [ null, %36 ], [ null, %35 ]
  ret ptr %.028
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 192}
!6 = !{!"_ZTSN4mace7runtime13OpenCLLibraryE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}


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