; LLVM IR from Overload-Technologies/Overload :: Dependencies/soloud/src/audiosource/monotone (soloud_monotone)

; 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.SoLoud::Monotone" = type { %"class.SoLoud::AudioSource", [800 x i32], [32 x i32], i32, i32, %"struct.SoLoud::MonotoneSong" }
%"class.SoLoud::AudioSource" = type { ptr, i32, float, float, i32, i32, float, float, float, i32, float, [8 x ptr], ptr, ptr, ptr, i32, double }
%"struct.SoLoud::MonotoneSong" = type { ptr, ptr, i8, i8, i8, i8, [256 x i8], ptr }

@__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic = external hidden unnamed_addr constant [10 x i8], align 1

; 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 uwtable
declare dso_local void @_ZN6SoLoud8Monotone5clearEv(ptr noundef nonnull align 8 dereferenceable(3776)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6SoLoud8Monotone8loadFileEPNS_4FileE(ptr noundef nonnull align 8 dereferenceable(3776) %0, ptr noundef %1) #1 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [200 x i8], align 16
  %8 = alloca [10 x i8], align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  store i32 1, ptr %3, align 4
  br label %171

16:                                               ; preds = %2
  call void @_ZN6SoLoud8Monotone5clearEv(ptr noundef nonnull align 8 dereferenceable(3776) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 200, ptr %7) #5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %19 = load ptr, ptr %17, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 3
  %21 = load ptr, ptr %20, align 8
  %22 = call noundef i32 %21(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %18, i32 noundef 9)
  call void @llvm.lifetime.start.p0(i64 10, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %8, ptr align 1 @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 10, i1 false)
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %23

23:                                               ; preds = %40, %16
  %24 = load i32, ptr %6, align 4, !tbaa !11
  %25 = icmp slt i32 %24, 9
  br i1 %25, label %26, label %43

26:                                               ; preds = %23
  %27 = load i32, ptr %6, align 4, !tbaa !11
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !13
  %31 = zext i8 %30 to i32
  %32 = load i32, ptr %6, align 4, !tbaa !11
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10 x i8], ptr %8, i64 0, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = sext i8 %35 to i32
  %37 = icmp ne i32 %31, %36
  br i1 %37, label %38, label %39

38:                                               ; preds = %26
  store i32 3, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %170

39:                                               ; preds = %26
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %6, align 4, !tbaa !11
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !11
  br label %23, !llvm.loop !14

43:                                               ; preds = %23
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %46 = load ptr, ptr %44, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %46, i64 3
  %48 = load ptr, ptr %47, align 8
  %49 = call noundef i32 %48(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef %45, i32 noundef 41)
  %50 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %51 = load i8, ptr %50, align 16, !tbaa !13
  %52 = zext i8 %51 to i32
  %53 = add nsw i32 %52, 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 %54
  store i8 0, ptr %55, align 1, !tbaa !13
  %56 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %57 = getelementptr inbounds i8, ptr %56, i64 1
  %58 = call noundef ptr @_ZN6SoLoudL8mystrdupEPKc(ptr noundef %57)
  %59 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %60 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %59, i32 0, i32 0
  store ptr %58, ptr %60, align 8, !tbaa !16
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %63 = load ptr, ptr %61, align 8, !tbaa !9
  %64 = getelementptr inbounds ptr, ptr %63, i64 3
  %65 = load ptr, ptr %64, align 8
  %66 = call noundef i32 %65(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef %62, i32 noundef 41)
  %67 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %68 = load i8, ptr %67, align 16, !tbaa !13
  %69 = zext i8 %68 to i32
  %70 = add nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 %71
  store i8 0, ptr %72, align 1, !tbaa !13
  %73 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %74 = getelementptr inbounds i8, ptr %73, i64 1
  %75 = call noundef ptr @_ZN6SoLoudL8mystrdupEPKc(ptr noundef %74)
  %76 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %77 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %76, i32 0, i32 1
  store ptr %75, ptr %77, align 8, !tbaa !22
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %80 = load ptr, ptr %78, align 8, !tbaa !9
  %81 = getelementptr inbounds ptr, ptr %80, i64 3
  %82 = load ptr, ptr %81, align 8
  %83 = call noundef i32 %82(ptr noundef nonnull align 8 dereferenceable(8) %78, ptr noundef %79, i32 noundef 4)
  %84 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %85 = load i8, ptr %84, align 16, !tbaa !13
  %86 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %87 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %86, i32 0, i32 2
  store i8 %85, ptr %87, align 8, !tbaa !23
  %88 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 1
  %89 = load i8, ptr %88, align 1, !tbaa !13
  %90 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %91 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %90, i32 0, i32 3
  store i8 %89, ptr %91, align 1, !tbaa !24
  %92 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 2
  %93 = load i8, ptr %92, align 2, !tbaa !13
  %94 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %95 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %94, i32 0, i32 4
  store i8 %93, ptr %95, align 2, !tbaa !25
  %96 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 3
  %97 = load i8, ptr %96, align 1, !tbaa !13
  %98 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %99 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %98, i32 0, i32 5
  store i8 %97, ptr %99, align 1, !tbaa !26
  %100 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %101 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %100, i32 0, i32 2
  %102 = load i8, ptr %101, align 8, !tbaa !23
  %103 = zext i8 %102 to i32
  %104 = icmp ne i32 %103, 1
  br i1 %104, label %111, label %105

105:                                              ; preds = %43
  %106 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %107 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %106, i32 0, i32 5
  %108 = load i8, ptr %107, align 1, !tbaa !26
  %109 = zext i8 %108 to i32
  %110 = icmp ne i32 %109, 2
  br i1 %110, label %111, label %112

111:                                              ; preds = %105, %43
  store i32 3, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %170

112:                                              ; preds = %105
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %115 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %114, i32 0, i32 6
  %116 = getelementptr inbounds [256 x i8], ptr %115, i64 0, i64 0
  %117 = load ptr, ptr %113, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %117, i64 3
  %119 = load ptr, ptr %118, align 8
  %120 = call noundef i32 %119(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef %116, i32 noundef 256)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %121 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %122 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %121, i32 0, i32 3
  %123 = load i8, ptr %122, align 1, !tbaa !24
  %124 = zext i8 %123 to i32
  %125 = mul nsw i32 64, %124
  %126 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %127 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %126, i32 0, i32 4
  %128 = load i8, ptr %127, align 2, !tbaa !25
  %129 = zext i8 %128 to i32
  %130 = mul nsw i32 %125, %129
  store i32 %130, ptr %10, align 4, !tbaa !11
  %131 = load i32, ptr %10, align 4, !tbaa !11
  %132 = sext i32 %131 to i64
  %133 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %132, i64 4)
  %134 = extractvalue { i64, i1 } %133, 1
  %135 = extractvalue { i64, i1 } %133, 0
  %136 = select i1 %134, i64 -1, i64 %135
  %137 = call noalias noundef nonnull ptr @_Znam(i64 noundef %136) #6
  %138 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %139 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %138, i32 0, i32 7
  store ptr %137, ptr %139, align 8, !tbaa !27
  store i32 0, ptr %6, align 4, !tbaa !11
  br label %140

140:                                              ; preds = %166, %112
  %141 = load i32, ptr %6, align 4, !tbaa !11
  %142 = load i32, ptr %10, align 4, !tbaa !11
  %143 = icmp slt i32 %141, %142
  br i1 %143, label %144, label %169

144:                                              ; preds = %140
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %147 = load ptr, ptr %145, align 8, !tbaa !9
  %148 = getelementptr inbounds ptr, ptr %147, i64 3
  %149 = load ptr, ptr %148, align 8
  %150 = call noundef i32 %149(ptr noundef nonnull align 8 dereferenceable(8) %145, ptr noundef %146, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %151 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 0
  %152 = load i8, ptr %151, align 16, !tbaa !13
  %153 = zext i8 %152 to i32
  %154 = getelementptr inbounds [200 x i8], ptr %7, i64 0, i64 1
  %155 = load i8, ptr %154, align 1, !tbaa !13
  %156 = zext i8 %155 to i32
  %157 = shl i32 %156, 8
  %158 = or i32 %153, %157
  store i32 %158, ptr %11, align 4, !tbaa !11
  %159 = load i32, ptr %11, align 4, !tbaa !11
  %160 = getelementptr inbounds %"class.SoLoud::Monotone", ptr %12, i32 0, i32 5
  %161 = getelementptr inbounds %"struct.SoLoud::MonotoneSong", ptr %160, i32 0, i32 7
  %162 = load ptr, ptr %161, align 8, !tbaa !27
  %163 = load i32, ptr %6, align 4, !tbaa !11
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i32, ptr %162, i64 %164
  store i32 %159, ptr %165, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %166

166:                                              ; preds = %144
  %167 = load i32, ptr %6, align 4, !tbaa !11
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %6, align 4, !tbaa !11
  br label %140, !llvm.loop !28

169:                                              ; preds = %140
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %170

170:                                              ; preds = %169, %111, %38
  call void @llvm.lifetime.end.p0(i64 10, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 200, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %171

171:                                              ; preds = %170, %15
  %172 = load i32, ptr %3, align 4
  ret i32 %172
}

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

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN6SoLoudL8mystrdupEPKc(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nobuiltin allocsize(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 #5 = { nounwind }
attributes #6 = { builtin allocsize(0) }

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !6, i64 3488}
!17 = !{!"_ZTSN6SoLoud8MonotoneE", !18, i64 0, !7, i64 152, !7, i64 3352, !12, i64 3480, !12, i64 3484, !21, i64 3488}
!18 = !{!"_ZTSN6SoLoud11AudioSourceE", !12, i64 8, !19, i64 12, !19, i64 16, !12, i64 20, !12, i64 24, !19, i64 28, !19, i64 32, !19, i64 36, !12, i64 40, !19, i64 44, !7, i64 48, !6, i64 112, !6, i64 120, !6, i64 128, !12, i64 136, !20, i64 144}
!19 = !{!"float", !7, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSN6SoLoud12MonotoneSongE", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !6, i64 280}
!22 = !{!17, !6, i64 3496}
!23 = !{!17, !7, i64 3504}
!24 = !{!17, !7, i64 3505}
!25 = !{!17, !7, i64 3506}
!26 = !{!17, !7, i64 3507}
!27 = !{!17, !6, i64 3768}
!28 = distinct !{!28, !15}


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

@__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic = external hidden unnamed_addr constant [10 x i8], align 1

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6SoLoud8Monotone5clearEv(ptr noundef nonnull align 8 dereferenceable(3776)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 4) i32 @_ZN6SoLoud8Monotone8loadFileEPNS_4FileE(ptr noundef nonnull align 8 dereferenceable(3776) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca [200 x i8], align 16
  %4 = icmp eq ptr %1, null
  br i1 %4, label %117, label %5

5:                                                ; preds = %2
  tail call void @_ZN6SoLoud8Monotone5clearEv(ptr noundef nonnull align 8 dereferenceable(3776) %0)
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %3) #3
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 24
  %8 = load ptr, ptr %7, align 8
  %9 = call noundef i32 %8(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %3, i32 noundef 9)
  %10 = load i8, ptr %3, align 16, !tbaa !8
  %11 = zext i8 %10 to i32
  %12 = load i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, align 1, !tbaa !8
  %13 = sext i8 %12 to i32
  %.not22 = icmp eq i32 %11, %13
  br i1 %.not22, label %14, label %.loopexit

14:                                               ; preds = %5
  %15 = getelementptr inbounds i8, ptr %3, i64 1
  %16 = load i8, ptr %15, align 1, !tbaa !8
  %17 = zext i8 %16 to i32
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 1), align 1, !tbaa !8
  %19 = sext i8 %18 to i32
  %.not22.1 = icmp eq i32 %17, %19
  br i1 %.not22.1, label %20, label %.loopexit

20:                                               ; preds = %14
  %21 = getelementptr inbounds i8, ptr %3, i64 2
  %22 = load i8, ptr %21, align 2, !tbaa !8
  %23 = zext i8 %22 to i32
  %24 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 2), align 1, !tbaa !8
  %25 = sext i8 %24 to i32
  %.not22.2 = icmp eq i32 %23, %25
  br i1 %.not22.2, label %26, label %.loopexit

26:                                               ; preds = %20
  %27 = getelementptr inbounds i8, ptr %3, i64 3
  %28 = load i8, ptr %27, align 1, !tbaa !8
  %29 = zext i8 %28 to i32
  %30 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 3), align 1, !tbaa !8
  %31 = sext i8 %30 to i32
  %.not22.3 = icmp eq i32 %29, %31
  br i1 %.not22.3, label %32, label %.loopexit

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %3, i64 4
  %34 = load i8, ptr %33, align 4, !tbaa !8
  %35 = zext i8 %34 to i32
  %36 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 4), align 1, !tbaa !8
  %37 = sext i8 %36 to i32
  %.not22.4 = icmp eq i32 %35, %37
  br i1 %.not22.4, label %38, label %.loopexit

38:                                               ; preds = %32
  %39 = getelementptr inbounds i8, ptr %3, i64 5
  %40 = load i8, ptr %39, align 1, !tbaa !8
  %41 = zext i8 %40 to i32
  %42 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 5), align 1, !tbaa !8
  %43 = sext i8 %42 to i32
  %.not22.5 = icmp eq i32 %41, %43
  br i1 %.not22.5, label %44, label %.loopexit

44:                                               ; preds = %38
  %45 = getelementptr inbounds i8, ptr %3, i64 6
  %46 = load i8, ptr %45, align 2, !tbaa !8
  %47 = zext i8 %46 to i32
  %48 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 6), align 1, !tbaa !8
  %49 = sext i8 %48 to i32
  %.not22.6 = icmp eq i32 %47, %49
  br i1 %.not22.6, label %50, label %.loopexit

50:                                               ; preds = %44
  %51 = getelementptr inbounds i8, ptr %3, i64 7
  %52 = load i8, ptr %51, align 1, !tbaa !8
  %53 = zext i8 %52 to i32
  %54 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 7), align 1, !tbaa !8
  %55 = sext i8 %54 to i32
  %.not22.7 = icmp eq i32 %53, %55
  br i1 %.not22.7, label %56, label %.loopexit

56:                                               ; preds = %50
  %57 = getelementptr inbounds i8, ptr %3, i64 8
  %58 = load i8, ptr %57, align 8, !tbaa !8
  %59 = zext i8 %58 to i32
  %60 = load i8, ptr getelementptr inbounds (i8, ptr @__const._ZN6SoLoud8Monotone8loadFileEPNS_4FileE.magic, i64 8), align 1, !tbaa !8
  %61 = sext i8 %60 to i32
  %.not22.8 = icmp eq i32 %59, %61
  br i1 %.not22.8, label %62, label %.loopexit

62:                                               ; preds = %56
  %63 = load ptr, ptr %1, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 24
  %65 = load ptr, ptr %64, align 8
  %66 = call noundef i32 %65(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %3, i32 noundef 41)
  %67 = load i8, ptr %3, align 16, !tbaa !8
  %68 = zext i8 %67 to i64
  %69 = add nuw nsw i64 %68, 1
  %70 = getelementptr inbounds [200 x i8], ptr %3, i64 0, i64 %69
  store i8 0, ptr %70, align 1, !tbaa !8
  %71 = call noundef ptr @_ZN6SoLoudL8mystrdupEPKc(ptr noundef nonnull %15)
  %72 = getelementptr inbounds i8, ptr %0, i64 3488
  store ptr %71, ptr %72, align 8, !tbaa !10
  %73 = load ptr, ptr %1, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %73, i64 24
  %75 = load ptr, ptr %74, align 8
  %76 = call noundef i32 %75(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %3, i32 noundef 41)
  %77 = load i8, ptr %3, align 16, !tbaa !8
  %78 = zext i8 %77 to i64
  %79 = add nuw nsw i64 %78, 1
  %80 = getelementptr inbounds [200 x i8], ptr %3, i64 0, i64 %79
  store i8 0, ptr %80, align 1, !tbaa !8
  %81 = call noundef ptr @_ZN6SoLoudL8mystrdupEPKc(ptr noundef nonnull %15)
  %82 = getelementptr inbounds i8, ptr %0, i64 3496
  store ptr %81, ptr %82, align 8, !tbaa !18
  %83 = load ptr, ptr %1, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 24
  %85 = load ptr, ptr %84, align 8
  %86 = call noundef i32 %85(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %3, i32 noundef 4)
  %87 = getelementptr inbounds i8, ptr %0, i64 3504
  %88 = load <4 x i8>, ptr %3, align 16, !tbaa !8
  store <4 x i8> %88, ptr %87, align 8, !tbaa !8
  %89 = extractelement <4 x i8> %88, i64 0
  %.not = icmp eq i8 %89, 1
  %90 = extractelement <4 x i8> %88, i64 3
  %.not21 = icmp eq i8 %90, 2
  %or.cond = select i1 %.not, i1 %.not21, i1 false
  br i1 %or.cond, label %91, label %.loopexit

91:                                               ; preds = %62
  %92 = getelementptr inbounds i8, ptr %0, i64 3506
  %93 = getelementptr inbounds i8, ptr %0, i64 3505
  %94 = getelementptr inbounds i8, ptr %0, i64 3508
  %95 = load ptr, ptr %1, align 8, !tbaa !5
  %96 = getelementptr inbounds i8, ptr %95, i64 24
  %97 = load ptr, ptr %96, align 8
  %98 = call noundef i32 %97(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %94, i32 noundef 256)
  %99 = load i8, ptr %93, align 1, !tbaa !19
  %100 = zext i8 %99 to i32
  %101 = shl nuw nsw i32 %100, 6
  %102 = load i8, ptr %92, align 2, !tbaa !20
  %103 = zext i8 %102 to i32
  %104 = mul nuw nsw i32 %101, %103
  %105 = shl nuw nsw i32 %104, 2
  %106 = zext nneg i32 %105 to i64
  %107 = call noalias noundef nonnull ptr @_Znam(i64 noundef %106) #4
  %108 = getelementptr inbounds i8, ptr %0, i64 3768
  store ptr %107, ptr %108, align 8, !tbaa !21
  %.not26 = icmp eq i32 %104, 0
  br i1 %.not26, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %91
  %wide.trip.count = zext nneg i32 %104 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %109 = load ptr, ptr %1, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 24
  %111 = load ptr, ptr %110, align 8
  %112 = call noundef i32 %111(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull %3, i32 noundef 2)
  %113 = load i16, ptr %3, align 16
  %114 = zext i16 %113 to i32
  %115 = load ptr, ptr %108, align 8, !tbaa !21
  %116 = getelementptr inbounds i32, ptr %115, i64 %indvars.iv
  store i32 %114, ptr %116, align 4, !tbaa !22
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !23

.loopexit:                                        ; preds = %.lr.ph, %5, %14, %20, %26, %32, %38, %44, %50, %56, %91, %62
  %.0 = phi i32 [ 3, %62 ], [ 0, %91 ], [ 3, %56 ], [ 3, %50 ], [ 3, %44 ], [ 3, %38 ], [ 3, %32 ], [ 3, %26 ], [ 3, %20 ], [ 3, %14 ], [ 3, %5 ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %3) #3
  br label %117

117:                                              ; preds = %2, %.loopexit
  %.1 = phi i32 [ %.0, %.loopexit ], [ 1, %2 ]
  ret i32 %.1
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZN6SoLoudL8mystrdupEPKc(ptr noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

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 = { nobuiltin allocsize(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 = { nounwind }
attributes #4 = { builtin allocsize(0) }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = !{!11, !15, i64 3488}
!11 = !{!"_ZTSN6SoLoud8MonotoneE", !12, i64 0, !9, i64 152, !9, i64 3352, !13, i64 3480, !13, i64 3484, !17, i64 3488}
!12 = !{!"_ZTSN6SoLoud11AudioSourceE", !13, i64 8, !14, i64 12, !14, i64 16, !13, i64 20, !13, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !13, i64 40, !14, i64 44, !9, i64 48, !15, i64 112, !15, i64 120, !15, i64 128, !13, i64 136, !16, i64 144}
!13 = !{!"int", !9, i64 0}
!14 = !{!"float", !9, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"double", !9, i64 0}
!17 = !{!"_ZTSN6SoLoud12MonotoneSongE", !15, i64 0, !15, i64 8, !9, i64 16, !9, i64 17, !9, i64 18, !9, i64 19, !9, i64 20, !15, i64 280}
!18 = !{!11, !15, i64 3496}
!19 = !{!11, !9, i64 3505}
!20 = !{!11, !9, i64 3506}
!21 = !{!11, !15, i64 3768}
!22 = !{!13, !13, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass