; LLVM IR from Try/Tempest :: Engine/thirdparty/openal-soft/al/effects (vmorpher)

; 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::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<VMorpherPhenome>::_Storage", i8 }>
%"union.std::_Optional_payload_base<VMorpherPhenome>::_Storage" = type { i32 }
%"class.std::optional.28" = type { %"struct.std::_Optional_base.29" }
%"struct.std::_Optional_base.29" = type { %"struct.std::_Optional_payload.31" }
%"struct.std::_Optional_payload.31" = type { %"struct.std::_Optional_payload_base.base.33", [3 x i8] }
%"struct.std::_Optional_payload_base.base.33" = type <{ %"union.std::_Optional_payload_base<VMorpherWaveform>::_Storage", i8 }>
%"union.std::_Optional_payload_base<VMorpherWaveform>::_Storage" = type { i32 }
%struct.VmorpherProps = type { float, i32, i32, i32, i32, i32 }

@.str = external hidden unnamed_addr constant [45 x i8], align 1
@_ZTIN2al13context_errorE = external constant ptr
@.str.1 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21VmorpherEffectHandler9SetParamiER13VmorpherPropsii(ptr noundef nonnull align 4 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::optional", align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::optional", align 4
  %11 = alloca %"class.std::optional.28", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %12 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %12, label %107 [
    i32 1, label %13
    i32 2, label %33
    i32 3, label %50
    i32 4, label %70
    i32 5, label %87
  ]

13:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %14 = load i32, ptr %6, align 4, !tbaa !9
  %15 = call i64 @_ZN12_GLOBAL__N_115PhenomeFromEnumEi(i32 noundef %14) #5
  %16 = getelementptr inbounds %"class.std::optional", ptr %7, i32 0, i32 0
  %17 = getelementptr inbounds %"struct.std::_Optional_base", ptr %16, i32 0, i32 0
  store i64 %15, ptr %17, align 4
  %18 = call noundef zeroext i1 @_ZNKSt8optionalI15VMorpherPhenomeEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %7) #5
  br i1 %18, label %19, label %24

19:                                               ; preds = %13
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalI15VMorpherPhenomeEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %7) #5
  %21 = load i32, ptr %20, align 4, !tbaa !11
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.VmorpherProps, ptr %22, i32 0, i32 1
  store i32 %21, ptr %23, align 4, !tbaa !13
  br label %32

24:                                               ; preds = %13
  %25 = call ptr @__cxa_allocate_exception(i64 48) #5
  %26 = load i32, ptr %6, align 4, !tbaa !9
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %25, i32 noundef 40963, ptr noundef @.str, i32 noundef %26)
          to label %27 unwind label %28

27:                                               ; preds = %24
  call void @__cxa_throw(ptr %25, ptr @_ZTIN2al13context_errorE, ptr @_ZN2al13context_errorD1Ev) #6
  unreachable

28:                                               ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  call void @__cxa_free_exception(ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %116

32:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %115

33:                                               ; preds = %3
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = icmp sge i32 %34, -24
  br i1 %35, label %36, label %39

36:                                               ; preds = %33
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = icmp sle i32 %37, 24
  br i1 %38, label %46, label %39

39:                                               ; preds = %36, %33
  %40 = call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %40, i32 noundef 40963, ptr noundef @.str.1)
          to label %41 unwind label %42

41:                                               ; preds = %39
  call void @__cxa_throw(ptr %40, ptr @_ZTIN2al13context_errorE, ptr @_ZN2al13context_errorD1Ev) #6
  unreachable

42:                                               ; preds = %39
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %8, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %9, align 4
  call void @__cxa_free_exception(ptr %40) #5
  br label %116

46:                                               ; preds = %36
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.VmorpherProps, ptr %48, i32 0, i32 3
  store i32 %47, ptr %49, align 4, !tbaa !17
  br label %115

50:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = call i64 @_ZN12_GLOBAL__N_115PhenomeFromEnumEi(i32 noundef %51) #5
  %53 = getelementptr inbounds %"class.std::optional", ptr %10, i32 0, i32 0
  %54 = getelementptr inbounds %"struct.std::_Optional_base", ptr %53, i32 0, i32 0
  store i64 %52, ptr %54, align 4
  %55 = call noundef zeroext i1 @_ZNKSt8optionalI15VMorpherPhenomeEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %10) #5
  br i1 %55, label %56, label %61

56:                                               ; preds = %50
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalI15VMorpherPhenomeEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %10) #5
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.VmorpherProps, ptr %59, i32 0, i32 2
  store i32 %58, ptr %60, align 4, !tbaa !18
  br label %69

61:                                               ; preds = %50
  %62 = call ptr @__cxa_allocate_exception(i64 48) #5
  %63 = load i32, ptr %6, align 4, !tbaa !9
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %62, i32 noundef 40963, ptr noundef @.str.2, i32 noundef %63)
          to label %64 unwind label %65

64:                                               ; preds = %61
  call void @__cxa_throw(ptr %62, ptr @_ZTIN2al13context_errorE, ptr @_ZN2al13context_errorD1Ev) #6
  unreachable

65:                                               ; preds = %61
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  call void @__cxa_free_exception(ptr %62) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %116

69:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %115

70:                                               ; preds = %3
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = icmp sge i32 %71, -24
  br i1 %72, label %73, label %76

73:                                               ; preds = %70
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = icmp sle i32 %74, 24
  br i1 %75, label %83, label %76

76:                                               ; preds = %73, %70
  %77 = call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %77, i32 noundef 40963, ptr noundef @.str.3)
          to label %78 unwind label %79

78:                                               ; preds = %76
  call void @__cxa_throw(ptr %77, ptr @_ZTIN2al13context_errorE, ptr @_ZN2al13context_errorD1Ev) #6
  unreachable

79:                                               ; preds = %76
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %8, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %9, align 4
  call void @__cxa_free_exception(ptr %77) #5
  br label %116

83:                                               ; preds = %73
  %84 = load i32, ptr %6, align 4, !tbaa !9
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.VmorpherProps, ptr %85, i32 0, i32 4
  store i32 %84, ptr %86, align 4, !tbaa !19
  br label %115

87:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = call i64 @_ZN12_GLOBAL__N_116WaveformFromEmumEi(i32 noundef %88) #5
  %90 = getelementptr inbounds %"class.std::optional.28", ptr %11, i32 0, i32 0
  %91 = getelementptr inbounds %"struct.std::_Optional_base.29", ptr %90, i32 0, i32 0
  store i64 %89, ptr %91, align 4
  %92 = call noundef zeroext i1 @_ZNKSt8optionalI16VMorpherWaveformEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %11) #5
  br i1 %92, label %93, label %98

93:                                               ; preds = %87
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalI16VMorpherWaveformEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %11) #5
  %95 = load i32, ptr %94, align 4, !tbaa !20
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.VmorpherProps, ptr %96, i32 0, i32 5
  store i32 %95, ptr %97, align 4, !tbaa !21
  br label %106

98:                                               ; preds = %87
  %99 = call ptr @__cxa_allocate_exception(i64 48) #5
  %100 = load i32, ptr %6, align 4, !tbaa !9
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %99, i32 noundef 40963, ptr noundef @.str.4, i32 noundef %100)
          to label %101 unwind label %102

101:                                              ; preds = %98
  call void @__cxa_throw(ptr %99, ptr @_ZTIN2al13context_errorE, ptr @_ZN2al13context_errorD1Ev) #6
  unreachable

102:                                              ; preds = %98
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %8, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %9, align 4
  call void @__cxa_free_exception(ptr %99) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %116

106:                                              ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %115

107:                                              ; preds = %3
  %108 = call ptr @__cxa_allocate_exception(i64 48) #5
  %109 = load i32, ptr %5, align 4, !tbaa !9
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %108, i32 noundef 40962, ptr noundef @.str.5, i32 noundef %109)
          to label %110 unwind label %111

110:                                              ; preds = %107
  call void @__cxa_throw(ptr %108, ptr @_ZTIN2al13context_errorE, ptr @_ZN2al13context_errorD1Ev) #6
  unreachable

111:                                              ; preds = %107
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %8, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %9, align 4
  call void @__cxa_free_exception(ptr %108) #5
  br label %116

115:                                              ; preds = %106, %83, %69, %46, %32
  ret void

116:                                              ; preds = %111, %102, %79, %65, %42, %28
  %117 = load ptr, ptr %8, align 8
  %118 = load i32, ptr %9, align 4
  %119 = insertvalue { ptr, i32 } poison, ptr %117, 0
  %120 = insertvalue { ptr, i32 } %119, i32 %118, 1
  resume { ptr, i32 } %120
}

; 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 hidden i64 @_ZN12_GLOBAL__N_115PhenomeFromEnumEi(i32 noundef) #2

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, ptr noundef, ...) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

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

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

!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 = !{!"_ZTS15VMorpherPhenome", !7, i64 0}
!13 = !{!14, !12, i64 4}
!14 = !{!"_ZTS13VmorpherProps", !15, i64 0, !12, i64 4, !12, i64 8, !10, i64 12, !10, i64 16, !16, i64 20}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTS16VMorpherWaveform", !7, i64 0}
!17 = !{!14, !10, i64 12}
!18 = !{!14, !12, i64 8}
!19 = !{!14, !10, i64 16}
!20 = !{!16, !16, i64 0}
!21 = !{!14, !16, i64 20}


; 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::optional" = type { %"struct.std::_Optional_base" }
%"struct.std::_Optional_base" = type { %"struct.std::_Optional_payload" }
%"struct.std::_Optional_payload" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<VMorpherPhenome>::_Storage", i8 }>
%"union.std::_Optional_payload_base<VMorpherPhenome>::_Storage" = type { i32 }
%"class.std::optional.28" = type { %"struct.std::_Optional_base.29" }
%"struct.std::_Optional_base.29" = type { %"struct.std::_Optional_payload.31" }
%"struct.std::_Optional_payload.31" = type { %"struct.std::_Optional_payload_base.base.33", [3 x i8] }
%"struct.std::_Optional_payload_base.base.33" = type <{ %"union.std::_Optional_payload_base<VMorpherWaveform>::_Storage", i8 }>
%"union.std::_Optional_payload_base<VMorpherWaveform>::_Storage" = type { i32 }

@.str = external hidden unnamed_addr constant [45 x i8], align 1
@_ZTIN2al13context_errorE = external constant ptr
@.str.1 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN21VmorpherEffectHandler9SetParamiER13VmorpherPropsii(ptr nocapture noundef nonnull writeonly align 4 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::optional", align 8
  %5 = alloca %"class.std::optional", align 8
  %6 = alloca %"class.std::optional.28", align 8
  switch i32 %1, label %61 [
    i32 1, label %7
    i32 2, label %19
    i32 3, label %28
    i32 4, label %40
    i32 5, label %49
  ]

7:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %8 = tail call i64 @_ZN12_GLOBAL__N_115PhenomeFromEnumEi(i32 noundef %2) #5
  store i64 %8, ptr %4, align 8
  %9 = call noundef zeroext i1 @_ZNKSt8optionalI15VMorpherPhenomeEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %4) #5
  br i1 %9, label %10, label %14

10:                                               ; preds = %7
  %11 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalI15VMorpherPhenomeEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %4) #5
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 4
  store i32 %12, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %66

14:                                               ; preds = %7
  %15 = call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %15, i32 noundef 40963, ptr noundef nonnull @.str, i32 noundef %2)
          to label %16 unwind label %17

16:                                               ; preds = %14
  call void @__cxa_throw(ptr nonnull %15, ptr nonnull @_ZTIN2al13context_errorE, ptr nonnull @_ZN2al13context_errorD1Ev) #6
  unreachable

17:                                               ; preds = %14
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %67

19:                                               ; preds = %3
  %20 = add i32 %2, 24
  %or.cond = icmp ult i32 %20, 49
  br i1 %or.cond, label %26, label %21

21:                                               ; preds = %19
  %22 = tail call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %22, i32 noundef 40963, ptr noundef nonnull @.str.1)
          to label %23 unwind label %24

23:                                               ; preds = %21
  tail call void @__cxa_throw(ptr nonnull %22, ptr nonnull @_ZTIN2al13context_errorE, ptr nonnull @_ZN2al13context_errorD1Ev) #6
  unreachable

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %22) #5
  br label %67

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %2, ptr %27, align 4, !tbaa !14
  br label %66

28:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %29 = tail call i64 @_ZN12_GLOBAL__N_115PhenomeFromEnumEi(i32 noundef %2) #5
  store i64 %29, ptr %5, align 8
  %30 = call noundef zeroext i1 @_ZNKSt8optionalI15VMorpherPhenomeEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %5) #5
  br i1 %30, label %31, label %35

31:                                               ; preds = %28
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalI15VMorpherPhenomeEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %5) #5
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %33, ptr %34, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %66

35:                                               ; preds = %28
  %36 = call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %36, i32 noundef 40963, ptr noundef nonnull @.str.2, i32 noundef %2)
          to label %37 unwind label %38

37:                                               ; preds = %35
  call void @__cxa_throw(ptr nonnull %36, ptr nonnull @_ZTIN2al13context_errorE, ptr nonnull @_ZN2al13context_errorD1Ev) #6
  unreachable

38:                                               ; preds = %35
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %67

40:                                               ; preds = %3
  %41 = add i32 %2, 24
  %or.cond3 = icmp ult i32 %41, 49
  br i1 %or.cond3, label %47, label %42

42:                                               ; preds = %40
  %43 = tail call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %43, i32 noundef 40963, ptr noundef nonnull @.str.3)
          to label %44 unwind label %45

44:                                               ; preds = %42
  tail call void @__cxa_throw(ptr nonnull %43, ptr nonnull @_ZTIN2al13context_errorE, ptr nonnull @_ZN2al13context_errorD1Ev) #6
  unreachable

45:                                               ; preds = %42
  %46 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %43) #5
  br label %67

47:                                               ; preds = %40
  %48 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %2, ptr %48, align 4, !tbaa !16
  br label %66

49:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %50 = tail call i64 @_ZN12_GLOBAL__N_116WaveformFromEmumEi(i32 noundef %2) #5
  store i64 %50, ptr %6, align 8
  %51 = call noundef zeroext i1 @_ZNKSt8optionalI16VMorpherWaveformEcvbEv(ptr noundef nonnull align 4 dereferenceable(8) %6) #5
  br i1 %51, label %52, label %56

52:                                               ; preds = %49
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNRSt8optionalI16VMorpherWaveformEdeEv(ptr noundef nonnull align 4 dereferenceable(8) %6) #5
  %54 = load i32, ptr %53, align 4, !tbaa !17
  %55 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %54, ptr %55, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %66

56:                                               ; preds = %49
  %57 = call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %57, i32 noundef 40963, ptr noundef nonnull @.str.4, i32 noundef %2)
          to label %58 unwind label %59

58:                                               ; preds = %56
  call void @__cxa_throw(ptr nonnull %57, ptr nonnull @_ZTIN2al13context_errorE, ptr nonnull @_ZN2al13context_errorD1Ev) #6
  unreachable

59:                                               ; preds = %56
  %60 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %57) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %67

61:                                               ; preds = %3
  %62 = tail call ptr @__cxa_allocate_exception(i64 48) #5
  invoke void (ptr, i32, ptr, ...) @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48) %62, i32 noundef 40962, ptr noundef nonnull @.str.5, i32 noundef %1)
          to label %63 unwind label %64

63:                                               ; preds = %61
  tail call void @__cxa_throw(ptr nonnull %62, ptr nonnull @_ZTIN2al13context_errorE, ptr nonnull @_ZN2al13context_errorD1Ev) #6
  unreachable

64:                                               ; preds = %61
  %65 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %62) #5
  br label %67

66:                                               ; preds = %52, %47, %31, %26, %10
  ret void

67:                                               ; preds = %64, %59, %45, %38, %24, %17
  %.pn = phi { ptr, i32 } [ %65, %64 ], [ %60, %59 ], [ %46, %45 ], [ %39, %38 ], [ %25, %24 ], [ %18, %17 ]
  resume { ptr, i32 } %.pn
}

; 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 hidden i64 @_ZN12_GLOBAL__N_115PhenomeFromEnumEi(i32 noundef) local_unnamed_addr #2

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZN2al13context_errorC1EiPKcz(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef, ptr noundef, ...) unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

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

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

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

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

!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 = !{!"_ZTS15VMorpherPhenome", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"_ZTS13VmorpherProps", !11, i64 0, !6, i64 4, !6, i64 8, !12, i64 12, !12, i64 16, !13, i64 20}
!11 = !{!"float", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTS16VMorpherWaveform", !7, i64 0}
!14 = !{!10, !12, i64 12}
!15 = !{!10, !6, i64 8}
!16 = !{!10, !12, i64 16}
!17 = !{!13, !13, i64 0}
!18 = !{!10, !13, i64 20}


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