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

; 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.sptk::reaper::Track" = type { i32, i32, %"class.sptk::reaper::FloatMatrix", %"class.std::vector", i8, float }
%"class.sptk::reaper::FloatMatrix" = type { ptr, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk6reaper5Track5ClearEv(ptr noundef nonnull align 8 dereferenceable(72)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #3 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) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk6reaper5Track3PadEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.sptk::reaper::Track", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %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
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = icmp sle i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  br label %180

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %24 = call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %19)
  store i32 %24, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %25 = call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %19)
  store i32 %25, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 72, ptr %8) #4
  call void @_ZN4sptk6reaper5TrackC1Ev(ptr noundef nonnull align 8 dereferenceable(72) %8)
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = add nsw i32 %26, %27
  %29 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72) %8, i32 noundef %28, i32 noundef %29)
          to label %30 unwind label %36

30:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %69, %30
  %32 = load i32, ptr %11, align 4, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %40, label %35

35:                                               ; preds = %31
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %77

36:                                               ; preds = %23
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %9, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %10, align 4
  br label %179

40:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %56, %40
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %63

46:                                               ; preds = %41
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %19, i32 noundef %47, i32 noundef %48)
          to label %50 unwind label %59

50:                                               ; preds = %46
  %51 = load float, ptr %49, align 4, !tbaa !11
  %52 = load i32, ptr %11, align 4, !tbaa !9
  %53 = load i32, ptr %13, align 4, !tbaa !9
  %54 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %8, i32 noundef %52, i32 noundef %53)
          to label %55 unwind label %59

55:                                               ; preds = %50
  store float %51, ptr %54, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %13, align 4, !tbaa !9
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %13, align 4, !tbaa !9
  br label %41, !llvm.loop !13

59:                                               ; preds = %50, %46
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %76

63:                                               ; preds = %45
  %64 = load i32, ptr %11, align 4, !tbaa !9
  %65 = load i32, ptr %11, align 4, !tbaa !9
  %66 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %19, i32 noundef %65)
          to label %67 unwind label %72

67:                                               ; preds = %63
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %8, i32 noundef %64, i1 noundef zeroext %66)
          to label %68 unwind label %72

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %11, align 4, !tbaa !9
  br label %31, !llvm.loop !15

72:                                               ; preds = %67, %63
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %9, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %10, align 4
  br label %76

76:                                               ; preds = %72, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %179

77:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %78

78:                                               ; preds = %116, %77
  %79 = load i32, ptr %14, align 4, !tbaa !9
  %80 = load i32, ptr %5, align 4, !tbaa !9
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 8, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %124

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %102, %83
  %85 = load i32, ptr %15, align 4, !tbaa !9
  %86 = load i32, ptr %7, align 4, !tbaa !9
  %87 = icmp slt i32 %85, %86
  br i1 %87, label %89, label %88

88:                                               ; preds = %84
  store i32 11, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %109

89:                                               ; preds = %84
  %90 = load i32, ptr %6, align 4, !tbaa !9
  %91 = sub nsw i32 %90, 1
  %92 = load i32, ptr %15, align 4, !tbaa !9
  %93 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %19, i32 noundef %91, i32 noundef %92)
          to label %94 unwind label %105

94:                                               ; preds = %89
  %95 = load float, ptr %93, align 4, !tbaa !11
  %96 = load i32, ptr %6, align 4, !tbaa !9
  %97 = load i32, ptr %14, align 4, !tbaa !9
  %98 = add nsw i32 %96, %97
  %99 = load i32, ptr %15, align 4, !tbaa !9
  %100 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %8, i32 noundef %98, i32 noundef %99)
          to label %101 unwind label %105

101:                                              ; preds = %94
  store float %95, ptr %100, align 4, !tbaa !11
  br label %102

102:                                              ; preds = %101
  %103 = load i32, ptr %15, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %15, align 4, !tbaa !9
  br label %84, !llvm.loop !16

105:                                              ; preds = %94, %89
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %9, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %123

109:                                              ; preds = %88
  %110 = load i32, ptr %14, align 4, !tbaa !9
  %111 = load i32, ptr %6, align 4, !tbaa !9
  %112 = sub nsw i32 %111, 1
  %113 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %19, i32 noundef %112)
          to label %114 unwind label %119

114:                                              ; preds = %109
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %8, i32 noundef %110, i1 noundef zeroext %113)
          to label %115 unwind label %119

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  %117 = load i32, ptr %14, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %14, align 4, !tbaa !9
  br label %78, !llvm.loop !17

119:                                              ; preds = %114, %109
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %9, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %10, align 4
  br label %123

123:                                              ; preds = %119, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %179

124:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %125 = invoke noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %8)
          to label %126 unwind label %136

126:                                              ; preds = %124
  store i32 %125, ptr %16, align 4, !tbaa !9
  invoke void @_ZN4sptk6reaper5Track5ClearEv(ptr noundef nonnull align 8 dereferenceable(72) %19)
          to label %127 unwind label %136

127:                                              ; preds = %126
  %128 = load i32, ptr %16, align 4, !tbaa !9
  %129 = load i32, ptr %7, align 4, !tbaa !9
  invoke void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72) %19, i32 noundef %128, i32 noundef %129)
          to label %130 unwind label %136

130:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %169, %130
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = load i32, ptr %16, align 4, !tbaa !9
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %140, label %135

135:                                              ; preds = %131
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %177

136:                                              ; preds = %127, %126, %124
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %9, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %10, align 4
  br label %178

140:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %141

141:                                              ; preds = %156, %140
  %142 = load i32, ptr %18, align 4, !tbaa !9
  %143 = load i32, ptr %7, align 4, !tbaa !9
  %144 = icmp slt i32 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %163

146:                                              ; preds = %141
  %147 = load i32, ptr %17, align 4, !tbaa !9
  %148 = load i32, ptr %18, align 4, !tbaa !9
  %149 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %8, i32 noundef %147, i32 noundef %148)
          to label %150 unwind label %159

150:                                              ; preds = %146
  %151 = load float, ptr %149, align 4, !tbaa !11
  %152 = load i32, ptr %17, align 4, !tbaa !9
  %153 = load i32, ptr %18, align 4, !tbaa !9
  %154 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %19, i32 noundef %152, i32 noundef %153)
          to label %155 unwind label %159

155:                                              ; preds = %150
  store float %151, ptr %154, align 4, !tbaa !11
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %18, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %18, align 4, !tbaa !9
  br label %141, !llvm.loop !18

159:                                              ; preds = %150, %146
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %9, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  br label %176

163:                                              ; preds = %145
  %164 = load i32, ptr %17, align 4, !tbaa !9
  %165 = load i32, ptr %17, align 4, !tbaa !9
  %166 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %8, i32 noundef %165)
          to label %167 unwind label %172

167:                                              ; preds = %163
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %19, i32 noundef %164, i1 noundef zeroext %166)
          to label %168 unwind label %172

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  %170 = load i32, ptr %17, align 4, !tbaa !9
  %171 = add nsw i32 %170, 1
  store i32 %171, ptr %17, align 4, !tbaa !9
  br label %131, !llvm.loop !19

172:                                              ; preds = %167, %163
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %9, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %10, align 4
  br label %176

176:                                              ; preds = %172, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %178

177:                                              ; preds = %135
  store i1 true, ptr %3, align 1
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @_ZN4sptk6reaper5TrackD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %8) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %180

178:                                              ; preds = %176, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %179

179:                                              ; preds = %178, %123, %76, %36
  call void @_ZN4sptk6reaper5TrackD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %8) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %182

180:                                              ; preds = %177, %22
  %181 = load i1, ptr %3, align 1
  ret i1 %181

182:                                              ; preds = %179
  %183 = load ptr, ptr %9, align 8
  %184 = load i32, ptr %10, align 4
  %185 = insertvalue { ptr, i32 } poison, ptr %183, 0
  %186 = insertvalue { ptr, i32 } %185, i32 %184, 1
  resume { ptr, i32 } %186
}

declare void @_ZN4sptk6reaper5TrackC1Ev(ptr)

declare void @_ZN4sptk6reaper5TrackD1Ev(ptr)

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !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"

%"class.sptk::reaper::Track" = type { i32, i32, %"class.sptk::reaper::FloatMatrix", %"class.std::vector", i8, float }
%"class.sptk::reaper::FloatMatrix" = type { ptr, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk6reaper5Track5ClearEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 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: mustprogress uwtable
declare dso_local void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk6reaper5Track3PadEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.sptk::reaper::Track", align 8
  %4 = icmp sgt i32 %1, 0
  br i1 %4, label %5, label %77

5:                                                ; preds = %2
  %6 = tail call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  %7 = tail call noundef i32 @_ZNK4sptk6reaper5Track12num_channelsEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #5
  call void @_ZN4sptk6reaper5TrackC1Ev(ptr noundef nonnull align 8 dereferenceable(72) %3)
  %8 = add nsw i32 %6, %1
  invoke void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %8, i32 noundef %7)
          to label %.preheader71 unwind label %41

.preheader71:                                     ; preds = %5
  %9 = icmp sgt i32 %6, 0
  br i1 %9, label %.preheader70.lr.ph, label %.preheader68.lr.ph

.preheader70.lr.ph:                               ; preds = %.preheader71
  %10 = icmp sgt i32 %7, 0
  br i1 %10, label %.preheader70.us, label %.preheader70

.preheader70.us:                                  ; preds = %.preheader70.lr.ph, %12
  %.05173.us = phi i32 [ %13, %12 ], [ 0, %.preheader70.lr.ph ]
  br label %14

11:                                               ; preds = %._crit_edge.us
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.05173.us, i1 noundef zeroext %21)
          to label %12 unwind label %.split.us

12:                                               ; preds = %11
  %13 = add nuw nsw i32 %.05173.us, 1
  %exitcond101.not = icmp eq i32 %13, %6
  br i1 %exitcond101.not, label %.preheader68.lr.ph, label %.preheader70.us, !llvm.loop !5

14:                                               ; preds = %.preheader70.us, %19
  %.05072.us = phi i32 [ 0, %.preheader70.us ], [ %20, %19 ]
  %15 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.05173.us, i32 noundef %.05072.us)
          to label %16 unwind label %.split75.us

16:                                               ; preds = %14
  %17 = load float, ptr %15, align 4, !tbaa !7
  %18 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.05173.us, i32 noundef %.05072.us)
          to label %19 unwind label %.split75.us

19:                                               ; preds = %16
  store float %17, ptr %18, align 4, !tbaa !7
  %20 = add nuw nsw i32 %.05072.us, 1
  %exitcond100.not = icmp eq i32 %20, %7
  br i1 %exitcond100.not, label %._crit_edge.us, label %14, !llvm.loop !11

._crit_edge.us:                                   ; preds = %19
  %21 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.05173.us)
          to label %11 unwind label %.split.us

.split.us:                                        ; preds = %11, %._crit_edge.us
  %22 = landingpad { ptr, i32 }
          cleanup
  br label %76

.split75.us:                                      ; preds = %16, %14
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %76

.preheader70:                                     ; preds = %.preheader70.lr.ph, %44
  %.05173 = phi i32 [ %45, %44 ], [ 0, %.preheader70.lr.ph ]
  %24 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.05173)
          to label %43 unwind label %.split

.preheader68.lr.ph:                               ; preds = %44, %12, %.preheader71
  %25 = icmp sgt i32 %7, 0
  %26 = add nsw i32 %6, -1
  %smax104 = call i32 @llvm.smax.i32(i32 %1, i32 1)
  br i1 %25, label %.preheader68.us, label %.preheader68

.preheader68.us:                                  ; preds = %.preheader68.lr.ph, %29
  %.04978.us = phi i32 [ %30, %29 ], [ 0, %.preheader68.lr.ph ]
  %27 = add nsw i32 %.04978.us, %6
  br label %31

28:                                               ; preds = %._crit_edge.us80
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.04978.us, i1 noundef zeroext %38)
          to label %29 unwind label %.split82.us

29:                                               ; preds = %28
  %30 = add nuw nsw i32 %.04978.us, 1
  %exitcond105.not = icmp eq i32 %30, %smax104
  br i1 %exitcond105.not, label %._crit_edge79, label %.preheader68.us, !llvm.loop !12

31:                                               ; preds = %.preheader68.us, %36
  %.04877.us = phi i32 [ 0, %.preheader68.us ], [ %37, %36 ]
  %32 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %26, i32 noundef %.04877.us)
          to label %33 unwind label %.split85.us

33:                                               ; preds = %31
  %34 = load float, ptr %32, align 4, !tbaa !7
  %35 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %27, i32 noundef %.04877.us)
          to label %36 unwind label %.split85.us

36:                                               ; preds = %33
  store float %34, ptr %35, align 4, !tbaa !7
  %37 = add nuw nsw i32 %.04877.us, 1
  %exitcond103.not = icmp eq i32 %37, %7
  br i1 %exitcond103.not, label %._crit_edge.us80, label %31, !llvm.loop !13

._crit_edge.us80:                                 ; preds = %36
  %38 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %26)
          to label %28 unwind label %.split82.us

.split82.us:                                      ; preds = %28, %._crit_edge.us80
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %76

.split85.us:                                      ; preds = %33, %31
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %76

41:                                               ; preds = %5
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %76

43:                                               ; preds = %.preheader70
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.05173, i1 noundef zeroext %24)
          to label %44 unwind label %.split

44:                                               ; preds = %43
  %45 = add nuw nsw i32 %.05173, 1
  %exitcond.not = icmp eq i32 %45, %6
  br i1 %exitcond.not, label %.preheader68.lr.ph, label %.preheader70, !llvm.loop !5

.split:                                           ; preds = %43, %.preheader70
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %76

.preheader68:                                     ; preds = %.preheader68.lr.ph, %50
  %.04978 = phi i32 [ %51, %50 ], [ 0, %.preheader68.lr.ph ]
  %47 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %26)
          to label %49 unwind label %.split82

._crit_edge79:                                    ; preds = %50, %29
  %48 = call noundef i32 @_ZNK4sptk6reaper5Track10num_framesEv(ptr noundef nonnull align 8 dereferenceable(72) %3)
  invoke void @_ZN4sptk6reaper5Track5ClearEv(ptr noundef nonnull align 8 dereferenceable(72) %0)
          to label %53 unwind label %70

49:                                               ; preds = %.preheader68
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.04978, i1 noundef zeroext %47)
          to label %50 unwind label %.split82

50:                                               ; preds = %49
  %51 = add nuw nsw i32 %.04978, 1
  %exitcond102.not = icmp eq i32 %51, %smax104
  br i1 %exitcond102.not, label %._crit_edge79, label %.preheader68, !llvm.loop !12

.split82:                                         ; preds = %49, %.preheader68
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %76

53:                                               ; preds = %._crit_edge79
  invoke void @_ZN4sptk6reaper5Track6resizeEii(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %48, i32 noundef %7)
          to label %.preheader67 unwind label %70

.preheader67:                                     ; preds = %53
  %54 = icmp sgt i32 %48, 0
  br i1 %54, label %.preheader.lr.ph, label %._crit_edge89

.preheader.lr.ph:                                 ; preds = %.preheader67
  %55 = icmp sgt i32 %7, 0
  br i1 %55, label %.preheader.us, label %.preheader

.preheader.us:                                    ; preds = %.preheader.lr.ph, %57
  %.04688.us = phi i32 [ %58, %57 ], [ 0, %.preheader.lr.ph ]
  br label %59

56:                                               ; preds = %._crit_edge.us90
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.04688.us, i1 noundef zeroext %66)
          to label %57 unwind label %.split92.us

57:                                               ; preds = %56
  %58 = add nuw nsw i32 %.04688.us, 1
  %exitcond108.not = icmp eq i32 %58, %48
  br i1 %exitcond108.not, label %._crit_edge89, label %.preheader.us, !llvm.loop !14

59:                                               ; preds = %.preheader.us, %64
  %.087.us = phi i32 [ 0, %.preheader.us ], [ %65, %64 ]
  %60 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.04688.us, i32 noundef %.087.us)
          to label %61 unwind label %.split95.us

61:                                               ; preds = %59
  %62 = load float, ptr %60, align 4, !tbaa !7
  %63 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4sptk6reaper5Track1aEii(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.04688.us, i32 noundef %.087.us)
          to label %64 unwind label %.split95.us

64:                                               ; preds = %61
  store float %62, ptr %63, align 4, !tbaa !7
  %65 = add nuw nsw i32 %.087.us, 1
  %exitcond107.not = icmp eq i32 %65, %7
  br i1 %exitcond107.not, label %._crit_edge.us90, label %59, !llvm.loop !15

._crit_edge.us90:                                 ; preds = %64
  %66 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.04688.us)
          to label %56 unwind label %.split92.us

.split92.us:                                      ; preds = %56, %._crit_edge.us90
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %76

.split95.us:                                      ; preds = %61, %59
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %76

.preheader:                                       ; preds = %.preheader.lr.ph, %73
  %.04688 = phi i32 [ %74, %73 ], [ 0, %.preheader.lr.ph ]
  %69 = invoke noundef zeroext i1 @_ZNK4sptk6reaper5Track1vEi(ptr noundef nonnull align 8 dereferenceable(72) %3, i32 noundef %.04688)
          to label %72 unwind label %.split92

._crit_edge89:                                    ; preds = %73, %57, %.preheader67
  call void @_ZN4sptk6reaper5TrackD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %3) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #5
  br label %77

70:                                               ; preds = %53, %._crit_edge79
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %76

72:                                               ; preds = %.preheader
  invoke void @_ZN4sptk6reaper5Track5set_vEib(ptr noundef nonnull align 8 dereferenceable(72) %0, i32 noundef %.04688, i1 noundef zeroext %69)
          to label %73 unwind label %.split92

73:                                               ; preds = %72
  %74 = add nuw nsw i32 %.04688, 1
  %exitcond106.not = icmp eq i32 %74, %48
  br i1 %exitcond106.not, label %._crit_edge89, label %.preheader, !llvm.loop !14

.split92:                                         ; preds = %72, %.preheader
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %76

76:                                               ; preds = %.split92, %.split92.us, %.split82, %.split82.us, %.split, %.split.us, %70, %.split95.us, %.split85.us, %.split75.us, %41
  %.pn64.pn = phi { ptr, i32 } [ %42, %41 ], [ %23, %.split75.us ], [ %40, %.split85.us ], [ %71, %70 ], [ %68, %.split95.us ], [ %46, %.split ], [ %22, %.split.us ], [ %52, %.split82 ], [ %39, %.split82.us ], [ %75, %.split92 ], [ %67, %.split92.us ]
  call void @_ZN4sptk6reaper5TrackD1Ev(ptr noundef nonnull align 8 dereferenceable(72) %3) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn64.pn

77:                                               ; preds = %2, %._crit_edge89
  ret i1 %4
}

declare void @_ZN4sptk6reaper5TrackC1Ev(ptr) local_unnamed_addr

declare void @_ZN4sptk6reaper5TrackD1Ev(ptr) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"float", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = distinct !{!11, !6}
!12 = distinct !{!12, !6}
!13 = distinct !{!13, !6}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}


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