; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/tiny_audio/b3AudioListener.ll (ZN15b3AudioListener4tickEPvS0_jdjS0_)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b3AudioListenerInternalData = type <{ i32, [4 x i8], double, [128 x ptr], %class.b3WriteWavFile, i8, [7 x i8] }>
%class.b3WriteWavFile = type { ptr, ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN15b3AudioListener4tickEPvS0_jdjS0_(ptr noundef %0, ptr noundef %1, i32 noundef %2, double noundef %3, i32 noundef %4, ptr noundef %5) #1 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca [2 x double], align 16
  %15 = alloca ptr, align 8
  %16 = alloca [2 x double], align 16
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca float, align 4
  %25 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !11
  store i32 %4, ptr %11, align 4, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %26, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %27, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %28 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %28, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  store i8 0, ptr %19, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %134, %6
  %30 = load i32, ptr %18, align 4, !tbaa !9
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %32, label %36

32:                                               ; preds = %29
  %33 = load i8, ptr %19, align 1, !tbaa !13, !range !15, !noundef !16
  %34 = trunc i8 %33 to i1
  %35 = xor i1 %34, true
  br label %36

36:                                               ; preds = %32, %29
  %37 = phi i1 [ false, %29 ], [ %35, %32 ]
  br i1 %37, label %38, label %135

38:                                               ; preds = %36
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.b3AudioListenerInternalData, ptr %39, i32 0, i32 0
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z5MyMinIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %40)
  %42 = load i32, ptr %41, align 4, !tbaa !9
  store i32 %42, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #5
  store i8 1, ptr %21, align 1, !tbaa !13
  %43 = load i8, ptr %21, align 1, !tbaa !13, !range !15, !noundef !16
  %44 = trunc i8 %43 to i1
  br i1 %44, label %45, label %127

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %120, %45
  %47 = load i32, ptr %22, align 4, !tbaa !9
  %48 = load i32, ptr %17, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 4, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %123

51:                                               ; preds = %46
  %52 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  store double 0.000000e+00, ptr %52, align 16, !tbaa !11
  %53 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 1
  store double 0.000000e+00, ptr %53, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store float 0.000000e+00, ptr %24, align 4, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  store i32 0, ptr %25, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %98, %51
  %55 = load i32, ptr %25, align 4, !tbaa !9
  %56 = icmp slt i32 %55, 128
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  store i32 7, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %101

58:                                               ; preds = %54
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.b3AudioListenerInternalData, ptr %59, i32 0, i32 3
  %61 = load i32, ptr %25, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [128 x ptr], ptr %60, i64 0, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %97

66:                                               ; preds = %58
  %67 = getelementptr inbounds [2 x double], ptr %16, i64 0, i64 0
  store double 0.000000e+00, ptr %67, align 16, !tbaa !11
  %68 = getelementptr inbounds [2 x double], ptr %16, i64 0, i64 1
  store double 0.000000e+00, ptr %68, align 8, !tbaa !11
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.b3AudioListenerInternalData, ptr %69, i32 0, i32 3
  %71 = load i32, ptr %25, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [128 x ptr], ptr %70, i64 0, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds [2 x double], ptr %16, i64 0, i64 0
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.b3AudioListenerInternalData, ptr %76, i32 0, i32 2
  %78 = load double, ptr %77, align 8, !tbaa !19
  %79 = load ptr, ptr %74, align 8, !tbaa !22
  %80 = getelementptr inbounds ptr, ptr %79, i64 2
  %81 = load ptr, ptr %80, align 8
  %82 = call noundef zeroext i1 %81(ptr noundef nonnull align 8 dereferenceable(16) %74, ptr noundef %75, i32 noundef 1, double noundef %78)
  br i1 %82, label %83, label %96

83:                                               ; preds = %66
  %84 = load float, ptr %24, align 4, !tbaa !17
  %85 = fadd float %84, 1.000000e+00
  store float %85, ptr %24, align 4, !tbaa !17
  %86 = getelementptr inbounds [2 x double], ptr %16, i64 0, i64 0
  %87 = load double, ptr %86, align 16, !tbaa !11
  %88 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  %89 = load double, ptr %88, align 16, !tbaa !11
  %90 = fadd double %89, %87
  store double %90, ptr %88, align 16, !tbaa !11
  %91 = getelementptr inbounds [2 x double], ptr %16, i64 0, i64 1
  %92 = load double, ptr %91, align 8, !tbaa !11
  %93 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 1
  %94 = load double, ptr %93, align 8, !tbaa !11
  %95 = fadd double %94, %92
  store double %95, ptr %93, align 8, !tbaa !11
  br label %96

96:                                               ; preds = %83, %66
  br label %97

97:                                               ; preds = %96, %58
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %25, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %25, align 4, !tbaa !9
  br label %54, !llvm.loop !24

101:                                              ; preds = %57
  %102 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  %103 = load double, ptr %102, align 16, !tbaa !11
  %104 = call double @tanh(double noundef %103) #5
  %105 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  store double %104, ptr %105, align 16, !tbaa !11
  %106 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 1
  %107 = load double, ptr %106, align 8, !tbaa !11
  %108 = call double @tanh(double noundef %107) #5
  %109 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 1
  store double %108, ptr %109, align 8, !tbaa !11
  %110 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 0
  %111 = load double, ptr %110, align 16, !tbaa !11
  %112 = load ptr, ptr %15, align 8, !tbaa !5
  %113 = getelementptr inbounds double, ptr %112, i32 1
  store ptr %113, ptr %15, align 8, !tbaa !5
  store double %111, ptr %112, align 8, !tbaa !11
  %114 = getelementptr inbounds [2 x double], ptr %14, i64 0, i64 1
  %115 = load double, ptr %114, align 8, !tbaa !11
  %116 = load ptr, ptr %15, align 8, !tbaa !5
  %117 = getelementptr inbounds double, ptr %116, i32 1
  store ptr %117, ptr %15, align 8, !tbaa !5
  store double %115, ptr %116, align 8, !tbaa !11
  %118 = load i32, ptr %20, align 4, !tbaa !9
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %120

120:                                              ; preds = %101
  %121 = load i32, ptr %22, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %22, align 4, !tbaa !9
  br label %46, !llvm.loop !26

123:                                              ; preds = %50
  %124 = load i32, ptr %17, align 4, !tbaa !9
  %125 = load i32, ptr %18, align 4, !tbaa !9
  %126 = sub nsw i32 %125, %124
  store i32 %126, ptr %18, align 4, !tbaa !9
  br label %127

127:                                              ; preds = %123, %38
  %128 = load i32, ptr %18, align 4, !tbaa !9
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %131

130:                                              ; preds = %127
  store i32 3, ptr %23, align 4
  br label %132

131:                                              ; preds = %127
  store i32 0, ptr %23, align 4
  br label %132

132:                                              ; preds = %131, %130
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  %133 = load i32, ptr %23, align 4
  switch i32 %133, label %149 [
    i32 0, label %134
    i32 3, label %135
  ]

134:                                              ; preds = %132
  br label %29, !llvm.loop !27

135:                                              ; preds = %132, %36
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.b3AudioListenerInternalData, ptr %136, i32 0, i32 5
  %138 = load i8, ptr %137, align 8, !tbaa !28, !range !15, !noundef !16
  %139 = trunc i8 %138 to i1
  br i1 %139, label %140, label %148

140:                                              ; preds = %135
  %141 = load i32, ptr %20, align 4, !tbaa !9
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %143, label %148

143:                                              ; preds = %140
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.b3AudioListenerInternalData, ptr %144, i32 0, i32 4
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load i32, ptr %20, align 4, !tbaa !9
  call void @_ZN14b3WriteWavFile4tickEPdi(ptr noundef nonnull align 8 dereferenceable(16) %145, ptr noundef %146, i32 noundef %147)
  br label %148

148:                                              ; preds = %143, %140, %135
  store i32 1, ptr %23, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  ret i32 0

149:                                              ; preds = %132
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_Z5MyMinIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: nounwind
declare double @tanh(double noundef) #3

declare void @_ZN14b3WriteWavFile4tickEPdi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 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 = { 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 #3 = { 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 #4 = { "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 }

!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 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!20, !12, i64 8}
!20 = !{!"_ZTS27b3AudioListenerInternalData", !10, i64 0, !12, i64 8, !7, i64 16, !21, i64 1040, !14, i64 1056}
!21 = !{!"_ZTS14b3WriteWavFile", !6, i64 8}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !8, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = !{!20, !14, i64 1056}


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

; Function Attrs: mustprogress 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
define dso_local noundef i32 @_ZN15b3AudioListener4tickEPvS0_jdjS0_(ptr noundef %0, ptr nocapture noundef readnone %1, i32 noundef %2, double noundef %3, i32 noundef %4, ptr noundef %5) local_unnamed_addr #1 align 2 {
  %7 = alloca [2 x double], align 16
  %8 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 %2, ptr %8, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %5, i64 16
  %10 = getelementptr inbounds i8, ptr %5, i64 8
  br label %11

11:                                               ; preds = %._crit_edge, %6
  %12 = phi i32 [ %20, %._crit_edge ], [ %2, %6 ]
  %.036 = phi ptr [ %.137.lcssa, %._crit_edge ], [ %0, %6 ]
  %.034 = phi i32 [ %.135.lcssa, %._crit_edge ], [ 0, %6 ]
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %14, label %45

14:                                               ; preds = %11
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_Z5MyMinIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader, label %._crit_edge

.preheader:                                       ; preds = %14, %22
  %.03346 = phi i32 [ %29, %22 ], [ 0, %14 ]
  %.13744 = phi ptr [ %28, %22 ], [ %.036, %14 ]
  br label %30

._crit_edge.loopexit:                             ; preds = %22
  %18 = add i32 %.034, %16
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %14
  %.137.lcssa = phi ptr [ %.036, %14 ], [ %28, %._crit_edge.loopexit ]
  %.135.lcssa = phi i32 [ %.034, %14 ], [ %18, %._crit_edge.loopexit ]
  %19 = load i32, ptr %8, align 4, !tbaa !5
  %20 = sub nsw i32 %19, %16
  store i32 %20, ptr %8, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %45, label %11

22:                                               ; preds = %43
  %23 = extractelement <2 x double> %44, i64 0
  %24 = call double @tanh(double noundef %23) #6
  %25 = extractelement <2 x double> %44, i64 1
  %26 = call double @tanh(double noundef %25) #6
  %27 = getelementptr inbounds i8, ptr %.13744, i64 8
  store double %24, ptr %.13744, align 8, !tbaa !9
  %28 = getelementptr inbounds i8, ptr %.13744, i64 16
  store double %26, ptr %27, align 8, !tbaa !9
  %29 = add nuw nsw i32 %.03346, 1
  %exitcond50.not = icmp eq i32 %29, %16
  br i1 %exitcond50.not, label %._crit_edge.loopexit, label %.preheader, !llvm.loop !11

30:                                               ; preds = %.preheader, %43
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next, %43 ]
  %31 = phi <2 x double> [ zeroinitializer, %.preheader ], [ %44, %43 ]
  %32 = getelementptr inbounds [128 x ptr], ptr %9, i64 0, i64 %indvars.iv
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %.not = icmp eq ptr %33, null
  br i1 %.not, label %43, label %34

34:                                               ; preds = %30
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %7, i8 0, i64 16, i1 false)
  %35 = load double, ptr %10, align 8, !tbaa !15
  %36 = load ptr, ptr %33, align 8, !tbaa !19
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = load ptr, ptr %37, align 8
  %39 = call noundef zeroext i1 %38(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull %7, i32 noundef 1, double noundef %35)
  br i1 %39, label %40, label %43

40:                                               ; preds = %34
  %41 = load <2 x double>, ptr %7, align 16, !tbaa !9
  %42 = fadd <2 x double> %31, %41
  br label %43

43:                                               ; preds = %30, %40, %34
  %44 = phi <2 x double> [ %42, %40 ], [ %31, %34 ], [ %31, %30 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 128
  br i1 %exitcond.not, label %22, label %30, !llvm.loop !21

45:                                               ; preds = %._crit_edge, %11
  %.3 = phi i32 [ %.135.lcssa, %._crit_edge ], [ %.034, %11 ]
  %46 = getelementptr inbounds i8, ptr %5, i64 1056
  %47 = load i8, ptr %46, align 8, !tbaa !22, !range !23, !noundef !24
  %48 = trunc nuw i8 %47 to i1
  %49 = icmp ne i32 %.3, 0
  %or.cond = select i1 %48, i1 %49, i1 false
  br i1 %or.cond, label %50, label %52

50:                                               ; preds = %45
  %51 = getelementptr inbounds i8, ptr %5, i64 1040
  call void @_ZN14b3WriteWavFile4tickEPdi(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef %0, i32 noundef %.3)
  br label %52

52:                                               ; preds = %50, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  ret i32 0
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_Z5MyMinIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @tanh(double noundef) local_unnamed_addr #3

declare void @_ZN14b3WriteWavFile4tickEPdi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!16, !10, i64 8}
!16 = !{!"_ZTS27b3AudioListenerInternalData", !6, i64 0, !10, i64 8, !7, i64 16, !17, i64 1040, !18, i64 1056}
!17 = !{!"_ZTS14b3WriteWavFile", !14, i64 8}
!18 = !{!"bool", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}
!21 = distinct !{!21, !12}
!22 = !{!16, !18, i64 1056}
!23 = !{i8 0, i8 2}
!24 = !{}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass