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

; 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.juce::MidiMessage" = type <{ %"union.juce::MidiMessage::PackedData", double, i32, [4 x i8] }>
%"union.juce::MidiMessage::PackedData" = type { ptr }

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

; 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 noundef ptr @_ZNK4juce11MidiMessage10getRawDataEv(ptr noundef nonnull align 8 dereferenceable(20)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK4juce11MidiMessage24isMidiMachineControlGotoERiS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #1 align 2 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %14 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  %15 = call noundef ptr @_ZNK4juce11MidiMessage10getRawDataEv(ptr noundef nonnull align 8 dereferenceable(20) %14) #2
  store ptr %15, ptr %12, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.juce::MidiMessage", ptr %14, i32 0, i32 2
  %17 = load i32, ptr %16, align 8, !tbaa !9
  %18 = icmp sge i32 %17, 12
  br i1 %18, label %19, label %77

19:                                               ; preds = %5
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 0
  %22 = load i8, ptr %21, align 1, !tbaa !13
  %23 = zext i8 %22 to i32
  %24 = icmp eq i32 %23, 240
  br i1 %24, label %25, label %77

25:                                               ; preds = %19
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 1
  %28 = load i8, ptr %27, align 1, !tbaa !13
  %29 = zext i8 %28 to i32
  %30 = icmp eq i32 %29, 127
  br i1 %30, label %31, label %77

31:                                               ; preds = %25
  %32 = load ptr, ptr %12, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 3
  %34 = load i8, ptr %33, align 1, !tbaa !13
  %35 = zext i8 %34 to i32
  %36 = icmp eq i32 %35, 6
  br i1 %36, label %37, label %77

37:                                               ; preds = %31
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 4
  %40 = load i8, ptr %39, align 1, !tbaa !13
  %41 = zext i8 %40 to i32
  %42 = icmp eq i32 %41, 68
  br i1 %42, label %43, label %77

43:                                               ; preds = %37
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 5
  %46 = load i8, ptr %45, align 1, !tbaa !13
  %47 = zext i8 %46 to i32
  %48 = icmp eq i32 %47, 6
  br i1 %48, label %49, label %77

49:                                               ; preds = %43
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = getelementptr inbounds i8, ptr %50, i64 6
  %52 = load i8, ptr %51, align 1, !tbaa !13
  %53 = zext i8 %52 to i32
  %54 = icmp eq i32 %53, 1
  br i1 %54, label %55, label %77

55:                                               ; preds = %49
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 7
  %58 = load i8, ptr %57, align 1, !tbaa !13
  %59 = zext i8 %58 to i32
  %60 = srem i32 %59, 24
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %60, ptr %61, align 4, !tbaa !14
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  %64 = load i8, ptr %63, align 1, !tbaa !13
  %65 = zext i8 %64 to i32
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %65, ptr %66, align 4, !tbaa !14
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 9
  %69 = load i8, ptr %68, align 1, !tbaa !13
  %70 = zext i8 %69 to i32
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %70, ptr %71, align 4, !tbaa !14
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 10
  %74 = load i8, ptr %73, align 1, !tbaa !13
  %75 = zext i8 %74 to i32
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %75, ptr %76, align 4, !tbaa !14
  store i1 true, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %78

77:                                               ; preds = %49, %43, %37, %31, %25, %19, %5
  store i1 false, ptr %6, align 1
  store i32 1, ptr %13, align 4
  br label %78

78:                                               ; preds = %77, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  %79 = load i1, ptr %6, align 1
  ret i1 %79
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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, !12, i64 16}
!10 = !{!"_ZTSN4juce11MidiMessageE", !7, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!12, !12, i64 0}


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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZNK4juce11MidiMessage24isMidiMachineControlGotoERiS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(20) %0, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %1, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %2, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %3, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %4) local_unnamed_addr #0 align 2 {
  %6 = tail call noundef ptr @_ZNK4juce11MidiMessage10getRawDataEv(ptr noundef nonnull align 8 dereferenceable(20) %0) #1
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = icmp sgt i32 %8, 11
  br i1 %9, label %10, label %47

10:                                               ; preds = %5
  %11 = load i8, ptr %6, align 1, !tbaa !11
  %12 = icmp eq i8 %11, -16
  br i1 %12, label %13, label %47

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %6, i64 1
  %15 = load i8, ptr %14, align 1, !tbaa !11
  %16 = icmp eq i8 %15, 127
  br i1 %16, label %17, label %47

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %6, i64 3
  %19 = load i8, ptr %18, align 1, !tbaa !11
  %20 = icmp eq i8 %19, 6
  br i1 %20, label %21, label %47

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %6, i64 4
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = icmp eq i8 %23, 68
  br i1 %24, label %25, label %47

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %6, i64 5
  %27 = load i8, ptr %26, align 1, !tbaa !11
  %28 = icmp eq i8 %27, 6
  br i1 %28, label %29, label %47

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %6, i64 6
  %31 = load i8, ptr %30, align 1, !tbaa !11
  %32 = icmp eq i8 %31, 1
  br i1 %32, label %33, label %47

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %6, i64 7
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = urem i8 %35, 24
  %37 = zext nneg i8 %36 to i32
  store i32 %37, ptr %1, align 4, !tbaa !12
  %38 = getelementptr inbounds i8, ptr %6, i64 8
  %39 = load i8, ptr %38, align 1, !tbaa !11
  %40 = zext i8 %39 to i32
  store i32 %40, ptr %2, align 4, !tbaa !12
  %41 = getelementptr inbounds i8, ptr %6, i64 9
  %42 = load i8, ptr %41, align 1, !tbaa !11
  %43 = zext i8 %42 to i32
  store i32 %43, ptr %3, align 4, !tbaa !12
  %44 = getelementptr inbounds i8, ptr %6, i64 10
  %45 = load i8, ptr %44, align 1, !tbaa !11
  %46 = zext i8 %45 to i32
  store i32 %46, ptr %4, align 4, !tbaa !12
  br label %47

47:                                               ; preds = %5, %10, %13, %17, %21, %25, %29, %33
  %.0 = phi i1 [ true, %33 ], [ false, %29 ], [ false, %25 ], [ false, %21 ], [ false, %17 ], [ false, %13 ], [ false, %10 ], [ false, %5 ]
  ret i1 %.0
}

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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, !10, i64 16}
!6 = !{!"_ZTSN4juce11MidiMessageE", !7, i64 0, !9, i64 8, !10, i64 16}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"double", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!10, !10, i64 0}


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