; LLVM IR from sp-nitech/SPTK :: third_party/REAPER/core/track.ll (ZNK4sptk6reaper5Track11GetSubTrackEiiii)

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

@stderr = external global ptr, align 8
@.str.22 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [53 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) #4 align 2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4sptk6reaper5Track11GetSubTrackEiiii(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) #7 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  %20 = load ptr, ptr %7, align 8
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = icmp sgt i32 %21, %22
  br i1 %23, label %38, label %24

24:                                               ; preds = %5
  %25 = load i32, ptr %8, align 4, !tbaa !9
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %38, label %27

27:                                               ; preds = %24
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  %30 = icmp sge i32 %28, %29
  br i1 %30, label %38, label %31

31:                                               ; preds = %27
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %38, label %34

34:                                               ; preds = %31
  %35 = load i32, ptr %9, align 4, !tbaa !9
  %36 = call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  %37 = icmp sge i32 %35, %36
  br i1 %37, label %38, label %44

38:                                               ; preds = %34, %31, %27, %24, %5
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = load i32, ptr %8, align 4, !tbaa !9
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  %43 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str.22, i32 noundef %40, i32 noundef %41, i32 noundef %42) #8
  store ptr null, ptr %6, align 8
  br label %133

44:                                               ; preds = %34
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = load i32, ptr %11, align 4, !tbaa !9
  %47 = icmp sgt i32 %45, %46
  br i1 %47, label %62, label %48

48:                                               ; preds = %44
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = icmp slt i32 %49, 0
  br i1 %50, label %62, label %51

51:                                               ; preds = %48
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  %54 = icmp sge i32 %52, %53
  br i1 %54, label %62, label %55

55:                                               ; preds = %51
  %56 = load i32, ptr %11, align 4, !tbaa !9
  %57 = icmp slt i32 %56, 0
  br i1 %57, label %62, label %58

58:                                               ; preds = %55
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  %61 = icmp sge i32 %59, %60
  br i1 %61, label %62, label %68

62:                                               ; preds = %58, %55, %51, %48, %44
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.23, i32 noundef %64, i32 noundef %65, i32 noundef %66) #8
  store ptr null, ptr %6, align 8
  br label %133

68:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %69 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #9
  invoke void @_ZN4sptk6reaper5TrackC1Ev(ptr noundef nonnull align 8 dereferenceable(72) %69)
          to label %70 unwind label %87

70:                                               ; preds = %68
  store ptr %69, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = load i32, ptr %8, align 4, !tbaa !9
  %73 = sub nsw i32 %71, %72
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = sub nsw i32 %75, %76
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %16, align 4, !tbaa !9
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = load i32, ptr %15, align 4, !tbaa !9
  %81 = load i32, ptr %16, align 4, !tbaa !9
  call void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72) %79, i32 noundef %80, i32 noundef %81)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %126, %70
  %83 = load i32, ptr %17, align 4, !tbaa !9
  %84 = load i32, ptr %15, align 4, !tbaa !9
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %91, label %86

86:                                               ; preds = %82
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %129

87:                                               ; preds = %68
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  call void @_ZdlPvm(ptr noundef %69, i64 noundef 72) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %135

91:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %109, %91
  %93 = load i32, ptr %19, align 4, !tbaa !9
  %94 = load i32, ptr %16, align 4, !tbaa !9
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  br label %112

97:                                               ; preds = %92
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = load i32, ptr %17, align 4, !tbaa !9
  %100 = add nsw i32 %98, %99
  %101 = load i32, ptr %10, align 4, !tbaa !9
  %102 = load i32, ptr %19, align 4, !tbaa !9
  %103 = add nsw i32 %101, %102
  %104 = call noundef float @_ZNK4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %20, i32 noundef %100, i32 noundef %103)
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load i32, ptr %17, align 4, !tbaa !9
  %107 = load i32, ptr %19, align 4, !tbaa !9
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %105, i32 noundef %106, i32 noundef %107)
  store float %104, ptr %108, align 4, !tbaa !11
  br label %109

109:                                              ; preds = %97
  %110 = load i32, ptr %19, align 4, !tbaa !9
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %19, align 4, !tbaa !9
  br label %92, !llvm.loop !13

112:                                              ; preds = %96
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = add nsw i32 %113, %114
  %116 = call noundef float @_ZNK4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72) %20, i32 noundef %115)
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = load i32, ptr %17, align 4, !tbaa !9
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72) %117, i32 noundef %118)
  store float %116, ptr %119, align 4, !tbaa !11
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  %121 = load i32, ptr %17, align 4, !tbaa !9
  %122 = load i32, ptr %8, align 4, !tbaa !9
  %123 = load i32, ptr %17, align 4, !tbaa !9
  %124 = add nsw i32 %122, %123
  %125 = call noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %20, i32 noundef %124)
  call void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %120, i32 noundef %121, i1 noundef zeroext %125)
  br label %126

126:                                              ; preds = %112
  %127 = load i32, ptr %17, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %17, align 4, !tbaa !9
  br label %82, !llvm.loop !15

129:                                              ; preds = %86
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = call noundef float @_ZNK4sptk6reaper5Track5shiftEv(ptr noundef nonnull align 8 dereferenceable(72) %20)
  call void @_ZN4sptk6reaper5Track9set_shiftEf(ptr noundef nonnull align 8 dereferenceable(72) %130, float noundef %131)
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %132, ptr %6, align 8
  store i32 1, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %133

133:                                              ; preds = %129, %62, %38
  %134 = load ptr, ptr %6, align 8
  ret ptr %134

135:                                              ; preds = %87
  %136 = load ptr, ptr %13, align 8
  %137 = load i32, ptr %14, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i1 noundef zeroext) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4sptk6reaper5Track9set_shiftEf(ptr noundef nonnull align 8 dereferenceable(72), float noundef) #1 align 2

declare void @_ZN4sptk6reaper5TrackC1Ev(ptr)

attributes #0 = { 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 #1 = { 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 #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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { nobuiltin 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str.22 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [53 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK4sptk6reaper5Track11GetSubTrackEiiii(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %6 = icmp sgt i32 %1, %2
  %7 = icmp slt i32 %1, 0
  %or.cond = or i1 %7, %6
  br i1 %or.cond, label %12, label %8

8:                                                ; preds = %5
  %9 = tail call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %.not70 = icmp sgt i32 %9, %1
  br i1 %.not70, label %10, label %12

10:                                               ; preds = %8
  %11 = tail call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %.not = icmp sgt i32 %11, %2
  br i1 %.not, label %16, label %12

12:                                               ; preds = %10, %8, %5
  %13 = load ptr, ptr @stderr, align 8, !tbaa !5
  %14 = tail call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.22, i32 noundef %1, i32 noundef %2, i32 noundef %14) #7
  br label %58

16:                                               ; preds = %10
  %17 = icmp sgt i32 %3, %4
  %18 = icmp slt i32 %3, 0
  %or.cond5 = or i1 %18, %17
  br i1 %or.cond5, label %23, label %19

19:                                               ; preds = %16
  %20 = tail call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %.not71 = icmp sgt i32 %20, %3
  br i1 %.not71, label %21, label %23

21:                                               ; preds = %19
  %22 = tail call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %.not62 = icmp sgt i32 %22, %4
  br i1 %.not62, label %27, label %23

23:                                               ; preds = %21, %19, %16
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = tail call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.23, i32 noundef %3, i32 noundef %4, i32 noundef %25) #7
  br label %58

27:                                               ; preds = %21
  %28 = tail call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #8
  invoke void @_ZN4sptk6reaper5TrackC1Ev(ptr noundef nonnull align 8 dereferenceable(72) %28)
          to label %29 unwind label %47

29:                                               ; preds = %27
  %30 = sub nsw i32 %2, %1
  %31 = add nsw i32 %30, 1
  %32 = sub nsw i32 %4, %3
  %33 = add nsw i32 %32, 1
  tail call void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72) %28, i32 noundef %31, i32 noundef %33)
  %.not6367 = icmp slt i32 %30, 0
  br i1 %.not6367, label %._crit_edge69, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %29
  %.not6465 = icmp slt i32 %32, 0
  br i1 %.not6465, label %.preheader.us.preheader, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %34 = add nsw i32 %4, 1
  %35 = sub i32 %34, %3
  %36 = add nsw i32 %2, 1
  %37 = sub i32 %36, %1
  br label %.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %38 = add nsw i32 %2, 1
  %39 = sub i32 %38, %1
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %.preheader.us
  %.05668.us = phi i32 [ %44, %.preheader.us ], [ 0, %.preheader.us.preheader ]
  %40 = add nuw nsw i32 %.05668.us, %1
  %41 = tail call noundef float @_ZNK4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %40)
  %42 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72) %28, i32 noundef %.05668.us)
  store float %41, ptr %42, align 4, !tbaa !9
  %43 = tail call noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %40)
  tail call void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %28, i32 noundef %.05668.us, i1 noundef zeroext %43)
  %44 = add nuw i32 %.05668.us, 1
  %exitcond74.not = icmp eq i32 %44, %39
  br i1 %exitcond74.not, label %._crit_edge69, label %.preheader.us, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %.05668 = phi i32 [ %52, %._crit_edge ], [ 0, %.preheader.preheader ]
  %45 = add nuw nsw i32 %.05668, %1
  br label %53

._crit_edge69:                                    ; preds = %._crit_edge, %.preheader.us, %29
  %46 = tail call noundef float @_ZNK4sptk6reaper5Track5shiftEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  tail call void @_ZN4sptk6reaper5Track9set_shiftEf(ptr noundef nonnull align 8 dereferenceable(72) %28, float noundef %46)
  br label %58

47:                                               ; preds = %27
  %48 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %28, i64 noundef 72) #9
  resume { ptr, i32 } %48

._crit_edge:                                      ; preds = %53
  %49 = tail call noundef float @_ZNK4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %45)
  %50 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1tEi(ptr noundef nonnull align 8 dereferenceable(72) %28, i32 noundef %.05668)
  store float %49, ptr %50, align 4, !tbaa !9
  %51 = tail call noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %45)
  tail call void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %28, i32 noundef %.05668, i1 noundef zeroext %51)
  %52 = add nuw i32 %.05668, 1
  %exitcond73.not = icmp eq i32 %52, %37
  br i1 %exitcond73.not, label %._crit_edge69, label %.preheader, !llvm.loop !11

53:                                               ; preds = %.preheader, %53
  %.066 = phi i32 [ 0, %.preheader ], [ %57, %53 ]
  %54 = add nuw nsw i32 %.066, %3
  %55 = tail call noundef float @_ZNK4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %45, i32 noundef %54)
  %56 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %28, i32 noundef %.05668, i32 noundef %.066)
  store float %55, ptr %56, align 4, !tbaa !9
  %57 = add nuw i32 %.066, 1
  %exitcond.not = icmp eq i32 %57, %35
  br i1 %exitcond.not, label %._crit_edge, label %53, !llvm.loop !13

58:                                               ; preds = %._crit_edge69, %23, %12
  %.057 = phi ptr [ null, %12 ], [ null, %23 ], [ %28, %._crit_edge69 ]
  ret ptr %.057
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4sptk6reaper5Track9set_shiftEf(ptr noundef nonnull align 8 dereferenceable(72), float noundef) local_unnamed_addr #1 align 2

declare void @_ZN4sptk6reaper5TrackC1Ev(ptr) local_unnamed_addr

attributes #0 = { 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 #1 = { 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 #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 = { 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 #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 = { nobuiltin 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 #6 = { 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 = { cold nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass