; LLVM IR from modlfo/AudioEngine :: AudioEngine/JuceLibraryCode (juce_gui_extra)

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

%"struct.juce::CodeEditorComponent::ColourScheme::TokenType" = type <{ %"class.juce::String", %"class.juce::Colour", [4 x i8] }>
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.92 }
%union.anon.92 = type { i32 }
%"struct.juce::CodeEditorComponent::ColourScheme" = type { %"class.juce::Array.70" }
%"class.juce::Array.70" = type { %"class.juce::ArrayAllocationBase.71", i32, [4 x i8] }
%"class.juce::ArrayAllocationBase.71" = type <{ %"class.juce::HeapBlock.72", i32, [4 x i8] }>
%"class.juce::HeapBlock.72" = type { ptr }

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

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: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce19CodeEditorComponent12ColourScheme3setERKNS_6StringENS_6ColourE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.juce::CodeEditorComponent::ColourScheme::TokenType", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %36, %3
  %15 = load i32, ptr %7, align 4, !tbaa !9
  %16 = getelementptr inbounds %"struct.juce::CodeEditorComponent::ColourScheme", ptr %13, i32 0, i32 0
  %17 = call noundef i32 @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %16) #4
  %18 = icmp slt i32 %15, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %14
  store i32 2, ptr %8, align 4
  br label %39

20:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %21 = getelementptr inbounds %"struct.juce::CodeEditorComponent::ColourScheme", ptr %13, i32 0, i32 0
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %21, i32 noundef %22) #4
  store ptr %23, ptr %9, align 8, !tbaa !5
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.juce::CodeEditorComponent::ColourScheme::TokenType", ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = call noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #4
  br i1 %27, label %28, label %32

28:                                               ; preds = %20
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.juce::CodeEditorComponent::ColourScheme::TokenType", ptr %29, i32 0, i32 1
  %31 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN4juce6ColouraSERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %30, ptr noundef nonnull align 1 dereferenceable(4) %2) #4
  store i32 1, ptr %8, align 4
  br label %33

32:                                               ; preds = %20
  store i32 0, ptr %8, align 4
  br label %33

33:                                               ; preds = %32, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %34 = load i32, ptr %8, align 4
  switch i32 %34, label %39 [
    i32 0, label %35
  ]

35:                                               ; preds = %33
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %7, align 4, !tbaa !9
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %7, align 4, !tbaa !9
  br label %14, !llvm.loop !11

39:                                               ; preds = %33, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %40 = load i32, ptr %8, align 4
  switch i32 %40, label %59 [
    i32 2, label %41
    i32 1, label %49
  ]

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  call void @_ZN4juce19CodeEditorComponent12ColourScheme9TokenTypeC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %10) #4
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.juce::CodeEditorComponent::ColourScheme::TokenType", ptr %10, i32 0, i32 0
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(8) %42) #4
  %45 = getelementptr inbounds %"struct.juce::CodeEditorComponent::ColourScheme::TokenType", ptr %10, i32 0, i32 1
  %46 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN4juce6ColouraSERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %45, ptr noundef nonnull align 1 dereferenceable(4) %2) #4
  %47 = getelementptr inbounds %"struct.juce::CodeEditorComponent::ColourScheme", ptr %13, i32 0, i32 0
  invoke void @_ZN4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE3addERKS3_(ptr noundef nonnull align 8 dereferenceable(20) %47, ptr noundef nonnull align 8 dereferenceable(12) %10)
          to label %48 unwind label %50

48:                                               ; preds = %41
  call void @_ZN4juce19CodeEditorComponent12ColourScheme9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  br label %49

49:                                               ; preds = %48, %39
  ret void

50:                                               ; preds = %41
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %11, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %12, align 4
  call void @_ZN4juce19CodeEditorComponent12ColourScheme9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  br label %54

54:                                               ; preds = %50
  %55 = load ptr, ptr %11, align 8
  %56 = load i32, ptr %12, align 4
  %57 = insertvalue { ptr, i32 } poison, ptr %55, 0
  %58 = insertvalue { ptr, i32 } %57, i32 %56, 1
  resume { ptr, i32 } %58

59:                                               ; preds = %39
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) #3 align 2

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: nounwind
declare noundef nonnull align 1 dereferenceable(4) ptr @_ZN4juce6ColouraSERKS0_(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4)) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE3addERKS3_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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"

%"struct.juce::CodeEditorComponent::ColourScheme::TokenType" = type <{ %"class.juce::String", %"class.juce::Colour", [4 x i8] }>
%"class.juce::String" = type { %"class.juce::CharPointer_UTF8" }
%"class.juce::CharPointer_UTF8" = type { ptr }
%"class.juce::Colour" = type { %"class.juce::PixelARGB" }
%"class.juce::PixelARGB" = type { %union.anon.92 }
%union.anon.92 = type { i32 }

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

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: nounwind
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce19CodeEditorComponent12ColourScheme3setERKNS_6StringENS_6ColourE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.juce::CodeEditorComponent::ColourScheme::TokenType", align 8
  %5 = tail call noundef i32 @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %0) #4
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.critedge, label %._crit_edge

7:                                                ; preds = %.critedge
  %8 = add nuw nsw i32 %.015, 1
  %9 = tail call noundef i32 @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20) %0) #4
  %10 = icmp slt i32 %8, %9
  br i1 %10, label %.critedge, label %._crit_edge, !llvm.loop !5

.critedge:                                        ; preds = %3, %7
  %.015 = phi i32 [ %8, %7 ], [ 0, %3 ]
  %11 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20) %0, i32 noundef %.015) #4
  %12 = tail call noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  br i1 %12, label %13, label %7

13:                                               ; preds = %.critedge
  %14 = getelementptr inbounds i8, ptr %11, i64 8
  %15 = tail call noundef nonnull align 1 dereferenceable(4) ptr @_ZN4juce6ColouraSERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %14, ptr noundef nonnull align 1 dereferenceable(4) %2) #4
  br label %20

._crit_edge:                                      ; preds = %7, %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @_ZN4juce19CodeEditorComponent12ColourScheme9TokenTypeC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %4) #4
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4juce6StringaSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  %17 = getelementptr inbounds i8, ptr %4, i64 8
  %18 = call noundef nonnull align 1 dereferenceable(4) ptr @_ZN4juce6ColouraSERKS0_(ptr noundef nonnull align 1 dereferenceable(4) %17, ptr noundef nonnull align 1 dereferenceable(4) %2) #4
  invoke void @_ZN4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE3addERKS3_(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr noundef nonnull align 8 dereferenceable(12) %4)
          to label %19 unwind label %21

19:                                               ; preds = %._crit_edge
  call void @_ZN4juce19CodeEditorComponent12ColourScheme9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br label %20

20:                                               ; preds = %13, %19
  ret void

21:                                               ; preds = %._crit_edge
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce19CodeEditorComponent12ColourScheme9TokenTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  resume { ptr, i32 } %22
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNK4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE12getReferenceEi(ptr noundef nonnull align 8 dereferenceable(20), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN4juceeqERKNS_6StringES2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: nounwind
declare noundef nonnull align 1 dereferenceable(4) ptr @_ZN4juce6ColouraSERKS0_(ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4juce5ArrayINS_19CodeEditorComponent12ColourScheme9TokenTypeENS_20DummyCriticalSectionELi0EE3addERKS3_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass