; LLVM IR from Try/Tempest :: Engine/thirdparty/openal-soft/core/logging.ll (Z8al_print8LogLevelPKcz)

; 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"

%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.al::span" = type { ptr }
%"class.al::span.2" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array" = type { [256 x i8] }
%"class.al::ptr_wrapper" = type { ptr }
%"class.al::span.3" = type { ptr, i64 }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::lock_guard" = type { ptr }
%"class.std::optional.4" = type { %"struct.std::_Optional_base.5" }
%"struct.std::_Optional_base.5" = type { %"struct.std::_Optional_payload.7" }
%"struct.std::_Optional_payload.7" = type { %"struct.std::_Optional_payload_base.8" }
%"struct.std::_Optional_payload_base.8" = type { %"union.std::_Optional_payload_base<char>::_Storage", i8 }
%"union.std::_Optional_payload_base<char>::_Storage" = type { %"struct.std::_Optional_payload_base<char>::_Empty_byte" }
%"struct.std::_Optional_payload_base<char>::_Empty_byte" = type { i8 }

@gLogFile = external dso_local global ptr, align 8
@gLogLevel = external dso_local global i32, align 4
@_ZN12_GLOBAL__N_112gLogCallbackE = external hidden global ptr, align 8
@_ZN12_GLOBAL__N_115gLogCallbackPtrE = external hidden global ptr, align 8
@_ZN12_GLOBAL__N_19gLogStateE = external hidden global i8, align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@_ZN12_GLOBAL__N_116LogCallbackMutexE = external hidden global { %union.pthread_mutex_t }, align 8

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z8al_print8LogLevelPKcz(i32 noundef %0, ptr noundef %1, ...) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.al::span", align 8
  %6 = alloca %"class.al::span.2", align 8
  %7 = alloca %"class.al::span", align 8
  %8 = alloca %"class.al::span.2", align 8
  %9 = alloca %"class.al::span", align 8
  %10 = alloca %"class.al::span.2", align 8
  %11 = alloca %"class.al::span", align 8
  %12 = alloca %"class.al::span.2", align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"struct.std::array", align 1
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.al::ptr_wrapper", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"class.al::span.3", align 8
  %21 = alloca [1 x %struct.__va_list_tag], align 16
  %22 = alloca [1 x %struct.__va_list_tag], align 16
  %23 = alloca i32, align 4
  %24 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %25 = alloca %"class.al::ptr_wrapper", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.al::span.3", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %30 = alloca %"class.al::span.3", align 8
  %31 = alloca %"class.al::span.3", align 8
  %32 = alloca ptr, align 8
  %33 = alloca %"class.std::lock_guard", align 8
  %34 = alloca %"class.al::span.3", align 8
  %35 = alloca %"class.std::optional.4", align 1
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  %36 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %39, label %40

39:                                               ; preds = %2
  br label %241

40:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #13
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 1 dereferenceable(15) @.str.2) #13
  %41 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #13
  %42 = getelementptr inbounds %"class.al::span", ptr %5, i32 0, i32 0
  store ptr %41, ptr %42, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #13
  %43 = load i32, ptr %3, align 4, !tbaa !5
  switch i32 %43, label %53 [
    i32 0, label %53
    i32 1, label %44
    i32 2, label %47
    i32 3, label %50
  ]

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #13
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 1 dereferenceable(15) @.str.3) #13
  %45 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #13
  %46 = getelementptr inbounds %"class.al::span", ptr %7, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #13
  br label %53

47:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #13
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 1 dereferenceable(15) @.str.4) #13
  %48 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #13
  %49 = getelementptr inbounds %"class.al::span", ptr %9, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %9, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #13
  br label %53

50:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #13
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 1 dereferenceable(15) @.str.5) #13
  %51 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #13
  %52 = getelementptr inbounds %"class.al::span", ptr %11, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %11, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #13
  br label %53

53:                                               ; preds = %50, %47, %44, %40, %40
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #13
  call void @_ZNSt6vectorIcSaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #13
  call void @llvm.lifetime.start.p0(i64 256, ptr %14) #13
  call void @llvm.memset.p0.i64(ptr align 1 %14, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #13
  %54 = call noundef ptr @_ZNSt5arrayIcLm256EE4dataEv(ptr noundef nonnull align 1 dereferenceable(256) %14) #14
  store ptr %54, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #13
  %55 = call ptr @_ZNK2al4spanIKcLm14EE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #13
  %56 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %17, i32 0, i32 0
  store ptr %55, ptr %56, align 8
  %57 = call noundef i64 @_ZNK2al4spanIKcLm14EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #13
  %58 = call noundef ptr @_ZNSt5arrayIcLm256EE5beginEv(ptr noundef nonnull align 1 dereferenceable(256) %14) #14
  %59 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %17, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = invoke noundef ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmPcET1_T_T0_S6_(ptr %60, i64 noundef %57, ptr noundef %58)
          to label %62 unwind label %114

62:                                               ; preds = %53
  store ptr %61, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #13
  %63 = load ptr, ptr %16, align 8, !tbaa !9
  %64 = call noundef ptr @_ZNSt5arrayIcLm256EE3endEv(ptr noundef nonnull align 1 dereferenceable(256) %14) #14
  invoke void @_ZN2al4spanIcLm18446744073709551615EEC2IPcS3_TnNSt9enable_ifIXntsr3std14is_convertibleIT0_mEE5valueEbE4typeELb1EEET_S5_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef %63, ptr noundef %64)
          to label %65 unwind label %118

65:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #13
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #13
  %66 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %21, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %66)
  %67 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %22, i64 0, i64 0
  %68 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %21, i64 0, i64 0
  call void @llvm.va_copy.p0(ptr %67, ptr %68)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #13
  %69 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %70 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %71 = load ptr, ptr %4, align 8, !tbaa !9
  %72 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %21, i64 0, i64 0
  %73 = call i32 @vsnprintf(ptr noundef %69, i64 noundef %70, ptr noundef %71, ptr noundef %72) #13
  store i32 %73, ptr %23, align 4, !tbaa !12
  %74 = load i32, ptr %23, align 4, !tbaa !12
  %75 = icmp sge i32 %74, 0
  br i1 %75, label %76, label %143

76:                                               ; preds = %65
  %77 = load i32, ptr %23, align 4, !tbaa !12
  %78 = sext i32 %77 to i64
  %79 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %80 = icmp uge i64 %78, %79
  %81 = call i1 @llvm.expect.i1(i1 %80, i1 false)
  br i1 %81, label %82, label %135

82:                                               ; preds = %76
  %83 = load i32, ptr %23, align 4, !tbaa !12
  %84 = sext i32 %83 to i64
  %85 = call noundef i64 @_ZNK2al4spanIKcLm14EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #13
  %86 = add i64 %84, %85
  %87 = add i64 %86, 1
  invoke void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %87)
          to label %88 unwind label %122

88:                                               ; preds = %82
  %89 = call noundef ptr @_ZNSt6vectorIcSaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #13
  store ptr %89, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #13
  %90 = call ptr @_ZNK2al4spanIKcLm14EE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #13
  %91 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %25, i32 0, i32 0
  store ptr %90, ptr %91, align 8
  %92 = call noundef i64 @_ZNK2al4spanIKcLm14EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #13
  %93 = call ptr @_ZNSt6vectorIcSaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #13
  %94 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  store ptr %93, ptr %94, align 8
  %95 = getelementptr inbounds %"class.al::ptr_wrapper", ptr %25, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %26, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8
  %99 = invoke ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEEET1_T_T0_SC_(ptr %96, i64 noundef %92, ptr %98)
          to label %100 unwind label %126

100:                                              ; preds = %88
  %101 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %24, i32 0, i32 0
  store ptr %99, ptr %101, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #13
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %28, ptr align 8 %24, i64 8, i1 false), !tbaa.struct !11
  %102 = call ptr @_ZNSt6vectorIcSaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #13
  %103 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  store ptr %102, ptr %103, align 8
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8
  %106 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %29, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8
  invoke void @_ZN2al4spanIcLm18446744073709551615EEC2IN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES9_TnNSt9enable_ifIXntsr3std14is_convertibleIT0_mEE5valueEbE4typeELb1EEET_SB_(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr %105, ptr %107)
          to label %108 unwind label %130

108:                                              ; preds = %100
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #13
  %109 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %110 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %111 = load ptr, ptr %4, align 8, !tbaa !9
  %112 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %22, i64 0, i64 0
  %113 = call i32 @vsnprintf(ptr noundef %109, i64 noundef %110, ptr noundef %111, ptr noundef %112) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #13
  br label %135

114:                                              ; preds = %53
  %115 = landingpad { ptr, i32 }
          catch ptr null
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %18, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %19, align 4
  br label %236

118:                                              ; preds = %62
  %119 = landingpad { ptr, i32 }
          catch ptr null
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %18, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %19, align 4
  br label %235

122:                                              ; preds = %82
  %123 = landingpad { ptr, i32 }
          catch ptr null
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %18, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %19, align 4
  br label %234

126:                                              ; preds = %88
  %127 = landingpad { ptr, i32 }
          catch ptr null
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %18, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %19, align 4
  br label %134

130:                                              ; preds = %100
  %131 = landingpad { ptr, i32 }
          catch ptr null
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %18, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #13
  br label %134

134:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #13
  br label %234

135:                                              ; preds = %108, %76
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #13
  %136 = load i32, ptr %23, align 4, !tbaa !12
  %137 = sext i32 %136 to i64
  %138 = call { ptr, i64 } @_ZNK2al4spanIcLm18446744073709551615EE5firstEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %137) #13
  %139 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 0
  %140 = extractvalue { ptr, i64 } %138, 0
  store ptr %140, ptr %139, align 8
  %141 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 1
  %142 = extractvalue { ptr, i64 } %138, 1
  store i64 %142, ptr %141, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %30, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #13
  br label %152

143:                                              ; preds = %65
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #13
  %144 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %145 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %146 = call i64 @strlen(ptr noundef %145) #15
  invoke void @_ZN2al4spanIcLm18446744073709551615EEC2IPcEET_m(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef %144, i64 noundef %146)
          to label %147 unwind label %148

147:                                              ; preds = %143
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %31, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #13
  br label %152

148:                                              ; preds = %143
  %149 = landingpad { ptr, i32 }
          catch ptr null
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %18, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #13
  br label %234

152:                                              ; preds = %147, %135
  %153 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %22, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %153)
  %154 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %21, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %154)
  %155 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %156 = load i32, ptr %3, align 4, !tbaa !5
  %157 = icmp sge i32 %155, %156
  br i1 %157, label %158, label %171

158:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #13
  %159 = load ptr, ptr @gLogFile, align 8, !tbaa !9
  store ptr %159, ptr %32, align 8, !tbaa !9
  %160 = load ptr, ptr %15, align 8, !tbaa !9
  %161 = load ptr, ptr %32, align 8, !tbaa !9
  %162 = invoke i32 @fputs(ptr noundef %160, ptr noundef %161)
          to label %163 unwind label %167

163:                                              ; preds = %158
  %164 = load ptr, ptr %32, align 8, !tbaa !9
  %165 = invoke i32 @fflush(ptr noundef %164)
          to label %166 unwind label %167

166:                                              ; preds = %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #13
  br label %171

167:                                              ; preds = %163, %158
  %168 = landingpad { ptr, i32 }
          catch ptr null
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %18, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #13
  br label %234

171:                                              ; preds = %166, %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #13
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(40) @_ZN12_GLOBAL__N_116LogCallbackMutexE)
          to label %172 unwind label %197

172:                                              ; preds = %171
  %173 = load i8, ptr @_ZN12_GLOBAL__N_19gLogStateE, align 1, !tbaa !17
  %174 = icmp ne i8 %173, 2
  br i1 %174, label %175, label %232

175:                                              ; preds = %172
  br label %176

176:                                              ; preds = %189, %175
  %177 = call noundef zeroext i1 @_ZNK2al4spanIcLm18446744073709551615EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  br i1 %177, label %185, label %178

178:                                              ; preds = %176
  %179 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNK2al4spanIcLm18446744073709551615EE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %180 unwind label %201

180:                                              ; preds = %178
  %181 = load i8, ptr %179, align 1, !tbaa !17
  %182 = sext i8 %181 to i32
  %183 = call i32 @isspace(i32 noundef %182) #15
  %184 = icmp ne i32 %183, 0
  br label %185

185:                                              ; preds = %180, %176
  %186 = phi i1 [ false, %176 ], [ %184, %180 ]
  br i1 %186, label %187, label %205

187:                                              ; preds = %185
  %188 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNK2al4spanIcLm18446744073709551615EE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %189 unwind label %201

189:                                              ; preds = %187
  store i8 0, ptr %188, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #13
  %190 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %191 = sub i64 %190, 1
  %192 = call { ptr, i64 } @_ZNK2al4spanIcLm18446744073709551615EE5firstEm(ptr noundef nonnull align 8 dereferenceable(16) %20, i64 noundef %191) #13
  %193 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 0
  %194 = extractvalue { ptr, i64 } %192, 0
  store ptr %194, ptr %193, align 8
  %195 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 1
  %196 = extractvalue { ptr, i64 } %192, 1
  store i64 %196, ptr %195, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %34, i64 16, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #13
  br label %176, !llvm.loop !18

197:                                              ; preds = %171
  %198 = landingpad { ptr, i32 }
          catch ptr null
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %18, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %19, align 4
  br label %233

201:                                              ; preds = %187, %178
  %202 = landingpad { ptr, i32 }
          catch ptr null
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %18, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %19, align 4
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #13
  br label %233

205:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 2, ptr %35) #13
  %206 = load i32, ptr %3, align 4, !tbaa !5
  %207 = call i16 @_ZN12_GLOBAL__N_112GetLevelCodeE8LogLevel(i32 noundef %206) #13
  %208 = getelementptr inbounds %"class.std::optional.4", ptr %35, i32 0, i32 0
  %209 = getelementptr inbounds %"struct.std::_Optional_base.5", ptr %208, i32 0, i32 0
  %210 = getelementptr inbounds %"struct.std::_Optional_payload.7", ptr %209, i32 0, i32 0
  store i16 %207, ptr %210, align 1
  %211 = call noundef zeroext i1 @_ZNKSt8optionalIcEcvbEv(ptr noundef nonnull align 1 dereferenceable(2) %35) #13
  br i1 %211, label %212, label %231

212:                                              ; preds = %205
  %213 = call noundef zeroext i1 @_ZNK2al4spanIcLm18446744073709551615EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  br i1 %213, label %231, label %214

214:                                              ; preds = %212
  %215 = load ptr, ptr @_ZN12_GLOBAL__N_112gLogCallbackE, align 8, !tbaa !9
  %216 = icmp ne ptr %215, null
  br i1 %216, label %217, label %225

217:                                              ; preds = %214
  %218 = load ptr, ptr @_ZN12_GLOBAL__N_112gLogCallbackE, align 8, !tbaa !9
  %219 = load ptr, ptr @_ZN12_GLOBAL__N_115gLogCallbackPtrE, align 8, !tbaa !9
  %220 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNRSt8optionalIcEdeEv(ptr noundef nonnull align 1 dereferenceable(2) %35) #13
  %221 = load i8, ptr %220, align 1, !tbaa !17
  %222 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %223 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #13
  %224 = trunc i64 %223 to i32
  call void %218(ptr noundef %219, i8 noundef signext %221, ptr noundef %222, i32 noundef %224) #13
  br label %230

225:                                              ; preds = %214
  %226 = load i8, ptr @_ZN12_GLOBAL__N_19gLogStateE, align 1, !tbaa !17
  %227 = icmp eq i8 %226, 0
  br i1 %227, label %228, label %229

228:                                              ; preds = %225
  store i8 2, ptr @_ZN12_GLOBAL__N_19gLogStateE, align 1, !tbaa !17
  br label %229

229:                                              ; preds = %228, %225
  br label %230

230:                                              ; preds = %229, %217
  br label %231

231:                                              ; preds = %230, %212, %205
  call void @llvm.lifetime.end.p0(i64 2, ptr %35) #13
  br label %232

232:                                              ; preds = %231, %172
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #13
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #13
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #13
  call void @llvm.lifetime.end.p0(i64 256, ptr %14) #13
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #13
  br label %241

233:                                              ; preds = %201, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #13
  br label %234

234:                                              ; preds = %233, %167, %148, %134, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #13
  br label %235

235:                                              ; preds = %234, %118
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #13
  br label %236

236:                                              ; preds = %235, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #13
  call void @llvm.lifetime.end.p0(i64 256, ptr %14) #13
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #13
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #13
  br label %237

237:                                              ; preds = %236
  %238 = load ptr, ptr %18, align 8
  %239 = call ptr @__cxa_begin_catch(ptr %238) #13
  invoke void @__cxa_end_catch()
          to label %240 unwind label %242

240:                                              ; preds = %237
  br label %241

241:                                              ; preds = %240, %232, %39
  ret void

242:                                              ; preds = %237
  %243 = landingpad { ptr, i32 }
          catch ptr null
  %244 = extractvalue { ptr, i32 } %243, 0
  call void @__clang_call_terminate(ptr %244) #16
  unreachable
}

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm256EE4dataEv(ptr noundef nonnull align 1 dereferenceable(256)) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmPcET1_T_T0_S6_(ptr, i64 noundef, ptr noundef) #6

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

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm256EE5beginEv(ptr noundef nonnull align 1 dereferenceable(256)) #5 align 2

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm256EE3endEv(ptr noundef nonnull align 1 dereferenceable(256)) #5 align 2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #7

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_copy.p0(ptr, ptr) #7

; Function Attrs: nounwind
declare i32 @vsnprintf(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i1 @llvm.expect.i1(i1, i1) #9

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNSt6vectorIcSaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEEET1_T_T0_SC_(ptr, i64 noundef, ptr) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIcSaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIcSaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK2al4spanIcLm18446744073709551615EE5firstEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #2 align 2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #10

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #7

declare i32 @fputs(ptr noundef, ptr noundef) #11

declare i32 @fflush(ptr noundef) #11

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK2al4spanIcLm18446744073709551615EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @isspace(i32 noundef) #10

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK2al4spanIcLm18446744073709551615EE4backEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden i16 @_ZN12_GLOBAL__N_112GetLevelCodeE8LogLevel(i32 noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIcEcvbEv(ptr noundef nonnull align 1 dereferenceable(2)) #2 align 2

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

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

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"_ZTS8LogLevel", !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 = !{i64 0, i64 8, !9}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{i64 0, i64 8, !9, i64 8, i64 8, !15}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; 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"

%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.al::span" = type { ptr }
%"class.al::span.2" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array" = type { [256 x i8] }
%"class.al::span.3" = type { ptr, i64 }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }
%"class.std::lock_guard" = type { ptr }
%"class.std::optional.4" = type { %"struct.std::_Optional_base.5" }
%"struct.std::_Optional_base.5" = type { %"struct.std::_Optional_payload.7" }
%"struct.std::_Optional_payload.7" = type { %"struct.std::_Optional_payload_base.8" }
%"struct.std::_Optional_payload_base.8" = type { %"union.std::_Optional_payload_base<char>::_Storage", i8 }
%"union.std::_Optional_payload_base<char>::_Storage" = type { %"struct.std::_Optional_payload_base<char>::_Empty_byte" }
%"struct.std::_Optional_payload_base<char>::_Empty_byte" = type { i8 }

@gLogFile = external dso_local local_unnamed_addr global ptr, align 8
@gLogLevel = external dso_local local_unnamed_addr global i32, align 4
@_ZN12_GLOBAL__N_112gLogCallbackE = external hidden local_unnamed_addr global ptr, align 8
@_ZN12_GLOBAL__N_115gLogCallbackPtrE = external hidden local_unnamed_addr global ptr, align 8
@_ZN12_GLOBAL__N_19gLogStateE = external hidden local_unnamed_addr global i8, align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@_ZN12_GLOBAL__N_116LogCallbackMutexE = external hidden global { %union.pthread_mutex_t }, align 8

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z8al_print8LogLevelPKcz(i32 noundef %0, ptr nocapture noundef readonly %1, ...) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.al::span", align 8
  %4 = alloca %"class.al::span.2", align 8
  %5 = alloca %"class.al::span.2", align 8
  %6 = alloca %"class.al::span.2", align 8
  %7 = alloca %"class.al::span.2", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca %"struct.std::array", align 1
  %10 = alloca %"class.al::span.3", align 8
  %11 = alloca [1 x %struct.__va_list_tag], align 16
  %12 = alloca [1 x %struct.__va_list_tag], align 16
  %13 = alloca %"class.al::span.3", align 8
  %14 = alloca %"class.al::span.3", align 8
  %15 = alloca %"class.std::lock_guard", align 8
  %16 = alloca %"class.std::optional.4", align 2
  %17 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %18 = icmp slt i32 %17, %0
  br i1 %18, label %122, label %19

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #12
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 1 dereferenceable(15) @.str.2) #12
  %20 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #12
  store ptr %20, ptr %3, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #12
  switch i32 %0, label %27 [
    i32 3, label %25
    i32 1, label %21
    i32 2, label %23
  ]

21:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #12
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 1 dereferenceable(15) @.str.3) #12
  %22 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #12
  store ptr %22, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #12
  br label %27

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #12
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 1 dereferenceable(15) @.str.4) #12
  %24 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #12
  store ptr %24, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #12
  br label %27

25:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #12
  call void @_ZN2al4spanIKcLm15EEC2ILm15EEERAT__S1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 1 dereferenceable(15) @.str.5) #12
  %26 = call ptr @_ZNK2al4spanIKcLm15EE5firstILm14EEENS0_IS1_XT_EEEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #12
  store ptr %26, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #12
  br label %27

27:                                               ; preds = %25, %23, %21, %19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #12
  call void @_ZNSt6vectorIcSaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #12
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %9) #12
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(256) %9, i8 0, i64 256, i1 false)
  %28 = call noundef ptr @_ZNSt5arrayIcLm256EE4dataEv(ptr noundef nonnull align 1 dereferenceable(256) %9) #13
  %29 = call ptr @_ZNK2al4spanIKcLm14EE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #12
  %30 = call noundef i64 @_ZNK2al4spanIKcLm14EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #12
  %31 = call noundef ptr @_ZNSt5arrayIcLm256EE5beginEv(ptr noundef nonnull align 1 dereferenceable(256) %9) #13
  %32 = invoke noundef ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmPcET1_T_T0_S6_(ptr %29, i64 noundef %30, ptr noundef %31)
          to label %33 unwind label %58

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #12
  %34 = call noundef ptr @_ZNSt5arrayIcLm256EE3endEv(ptr noundef nonnull align 1 dereferenceable(256) %9) #13
  invoke void @_ZN2al4spanIcLm18446744073709551615EEC2IPcS3_TnNSt9enable_ifIXntsr3std14is_convertibleIT0_mEE5valueEbE4typeELb1EEET_S5_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef %32, ptr noundef %34)
          to label %35 unwind label %60

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #12
  call void @llvm.va_start.p0(ptr nonnull %11)
  call void @llvm.va_copy.p0(ptr nonnull %12, ptr nonnull %11)
  %36 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %37 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %38 = call i32 @vsnprintf(ptr noundef %36, i64 noundef %37, ptr noundef %1, ptr noundef nonnull %11) #12
  %39 = icmp sgt i32 %38, -1
  br i1 %39, label %40, label %70

40:                                               ; preds = %35
  %41 = zext nneg i32 %38 to i64
  %42 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %.not = icmp ugt i64 %42, %41
  br i1 %.not, label %66, label %43, !prof !11

43:                                               ; preds = %40
  %44 = call noundef i64 @_ZNK2al4spanIKcLm14EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #12
  %45 = add nuw nsw i64 %41, 1
  %46 = add i64 %45, %44
  invoke void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %46)
          to label %47 unwind label %62

47:                                               ; preds = %43
  %48 = call noundef ptr @_ZNSt6vectorIcSaIcEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #12
  %49 = call ptr @_ZNK2al4spanIKcLm14EE5beginEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #12
  %50 = call noundef i64 @_ZNK2al4spanIKcLm14EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #12
  %51 = call ptr @_ZNSt6vectorIcSaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #12
  %52 = invoke ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEEET1_T_T0_SC_(ptr %49, i64 noundef %50, ptr %51)
          to label %53 unwind label %64

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #12
  %54 = call ptr @_ZNSt6vectorIcSaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #12
  call void @_ZN2al4spanIcLm18446744073709551615EEC2IN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEES9_TnNSt9enable_ifIXntsr3std14is_convertibleIT0_mEE5valueEbE4typeELb1EEET_SB_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr %52, ptr %54)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %13, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #12
  %55 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %56 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %57 = call i32 @vsnprintf(ptr noundef %55, i64 noundef %56, ptr noundef %1, ptr noundef nonnull %12) #12
  br label %66

58:                                               ; preds = %27
  %59 = landingpad { ptr, i32 }
          catch ptr null
  br label %120

60:                                               ; preds = %33
  %61 = landingpad { ptr, i32 }
          catch ptr null
  br label %119

62:                                               ; preds = %43
  %63 = landingpad { ptr, i32 }
          catch ptr null
  br label %118

64:                                               ; preds = %47
  %65 = landingpad { ptr, i32 }
          catch ptr null
  br label %118

66:                                               ; preds = %53, %40
  %.0 = phi ptr [ %48, %53 ], [ %28, %40 ]
  %67 = call { ptr, i64 } @_ZNK2al4spanIcLm18446744073709551615EE5firstEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %41) #12
  %68 = extractvalue { ptr, i64 } %67, 0
  %69 = extractvalue { ptr, i64 } %67, 1
  store ptr %68, ptr %10, align 8, !tbaa !9
  %.sroa.43.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store i64 %69, ptr %.sroa.43.0..sroa_idx, align 8, !tbaa !13
  br label %74

70:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #12
  %71 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %72 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %73 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %72) #14
  call void @_ZN2al4spanIcLm18446744073709551615EEC2IPcEET_m(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %71, i64 noundef %73)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %14, i64 16, i1 false), !tbaa.struct !12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #12
  br label %74

74:                                               ; preds = %70, %66
  %.1 = phi ptr [ %.0, %66 ], [ %28, %70 ]
  call void @llvm.va_end.p0(ptr nonnull %12)
  call void @llvm.va_end.p0(ptr nonnull %11)
  %75 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %.not31 = icmp slt i32 %75, %0
  br i1 %.not31, label %80, label %76

76:                                               ; preds = %74
  %77 = load ptr, ptr @gLogFile, align 8, !tbaa !9
  %78 = call i32 @fputs(ptr noundef %.1, ptr noundef %77)
  %79 = call i32 @fflush(ptr noundef %77)
  br label %80

80:                                               ; preds = %76, %74
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #12
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(40) @_ZN12_GLOBAL__N_116LogCallbackMutexE)
          to label %81 unwind label %97

81:                                               ; preds = %80
  %82 = load i8, ptr @_ZN12_GLOBAL__N_19gLogStateE, align 1, !tbaa !15
  %.not32 = icmp eq i8 %82, 2
  br i1 %.not32, label %117, label %.preheader

.preheader:                                       ; preds = %81
  %83 = call noundef zeroext i1 @_ZNK2al4spanIcLm18446744073709551615EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  br i1 %83, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  br label %84

84:                                               ; preds = %.lr.ph, %89
  %85 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK2al4spanIcLm18446744073709551615EE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  %86 = load i8, ptr %85, align 1, !tbaa !15
  %87 = sext i8 %86 to i32
  %88 = call i32 @isspace(i32 noundef %87) #14
  %.not33 = icmp eq i32 %88, 0
  br i1 %.not33, label %.critedge, label %89

89:                                               ; preds = %84
  %90 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK2al4spanIcLm18446744073709551615EE4backEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  store i8 0, ptr %90, align 1, !tbaa !15
  %91 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %92 = add i64 %91, -1
  %93 = call { ptr, i64 } @_ZNK2al4spanIcLm18446744073709551615EE5firstEm(ptr noundef nonnull align 8 dereferenceable(16) %10, i64 noundef %92) #12
  %94 = extractvalue { ptr, i64 } %93, 0
  %95 = extractvalue { ptr, i64 } %93, 1
  store ptr %94, ptr %10, align 8, !tbaa !9
  store i64 %95, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !13
  %96 = call noundef zeroext i1 @_ZNK2al4spanIcLm18446744073709551615EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  br i1 %96, label %.critedge, label %84, !llvm.loop !16

97:                                               ; preds = %80
  %98 = landingpad { ptr, i32 }
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #12
  br label %118

.critedge:                                        ; preds = %84, %89, %.preheader
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %16) #12
  %99 = call i16 @_ZN12_GLOBAL__N_112GetLevelCodeE8LogLevel(i32 noundef %0) #12
  store i16 %99, ptr %16, align 2
  %100 = call noundef zeroext i1 @_ZNKSt8optionalIcEcvbEv(ptr noundef nonnull align 1 dereferenceable(2) %16) #12
  br i1 %100, label %101, label %116

101:                                              ; preds = %.critedge
  %102 = call noundef zeroext i1 @_ZNK2al4spanIcLm18446744073709551615EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  br i1 %102, label %116, label %103

103:                                              ; preds = %101
  %104 = load ptr, ptr @_ZN12_GLOBAL__N_112gLogCallbackE, align 8, !tbaa !9
  %.not34 = icmp eq ptr %104, null
  br i1 %.not34, label %112, label %105

105:                                              ; preds = %103
  %106 = load ptr, ptr @_ZN12_GLOBAL__N_115gLogCallbackPtrE, align 8, !tbaa !9
  %107 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNRSt8optionalIcEdeEv(ptr noundef nonnull align 1 dereferenceable(2) %16) #12
  %108 = load i8, ptr %107, align 1, !tbaa !15
  %109 = call noundef ptr @_ZNK2al4spanIcLm18446744073709551615EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %110 = call noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #12
  %111 = trunc i64 %110 to i32
  call void %104(ptr noundef %106, i8 noundef signext %108, ptr noundef %109, i32 noundef %111) #12
  br label %116

112:                                              ; preds = %103
  %113 = load i8, ptr @_ZN12_GLOBAL__N_19gLogStateE, align 1, !tbaa !15
  %114 = icmp eq i8 %113, 0
  br i1 %114, label %115, label %116

115:                                              ; preds = %112
  store i8 2, ptr @_ZN12_GLOBAL__N_19gLogStateE, align 1, !tbaa !15
  br label %116

116:                                              ; preds = %105, %115, %112, %101, %.critedge
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %16) #12
  br label %117

117:                                              ; preds = %116, %81
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #12
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %9) #12
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #12
  br label %122

118:                                              ; preds = %97, %64, %62
  %.pn = phi { ptr, i32 } [ %98, %97 ], [ %65, %64 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #12
  br label %119

119:                                              ; preds = %118, %60
  %.pn.pn = phi { ptr, i32 } [ %.pn, %118 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #12
  br label %120

120:                                              ; preds = %119, %58
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %119 ], [ %59, %58 ]
  %.2 = extractvalue { ptr, i32 } %.pn.pn.pn, 0
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %9) #12
  call void @_ZNSt6vectorIcSaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #12
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #12
  %121 = call ptr @__cxa_begin_catch(ptr %.2) #12
  invoke void @__cxa_end_catch()
          to label %122 unwind label %123

122:                                              ; preds = %120, %2, %117
  ret void

123:                                              ; preds = %120
  %124 = landingpad { ptr, i32 }
          catch ptr null
  %125 = extractvalue { ptr, i32 } %124, 0
  call void @__clang_call_terminate(ptr %125) #15
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm256EE4dataEv(ptr noundef nonnull align 1 dereferenceable(256)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmPcET1_T_T0_S6_(ptr, i64 noundef, ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm256EE5beginEv(ptr noundef nonnull align 1 dereferenceable(256)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef ptr @_ZNSt5arrayIcLm256EE3endEv(ptr noundef nonnull align 1 dereferenceable(256)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_copy.p0(ptr, ptr) #7

; Function Attrs: nofree nounwind
declare noundef i32 @vsnprintf(ptr nocapture noundef, i64 noundef, ptr nocapture noundef readonly, ptr noundef) local_unnamed_addr #8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK2al4spanIcLm18446744073709551615EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIcSaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6copy_nIN2al11ptr_wrapperIPKcEEmN9__gnu_cxx17__normal_iteratorIPcSt6vectorIcSaIcEEEEET1_T_T0_SC_(ptr, i64 noundef, ptr) local_unnamed_addr #6

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i64 } @_ZNK2al4spanIcLm18446744073709551615EE5firstEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #9

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #7

; Function Attrs: nofree nounwind
declare noundef i32 @fputs(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #8

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK2al4spanIcLm18446744073709551615EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @isspace(i32 noundef) local_unnamed_addr #10

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNK2al4spanIcLm18446744073709551615EE4backEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden i16 @_ZN12_GLOBAL__N_112GetLevelCodeE8LogLevel(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8optionalIcEcvbEv(ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #2 align 2

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

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

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"_ZTS8LogLevel", !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 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!12 = !{i64 0, i64 8, !9, i64 8, i64 8, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass