; LLVM IR from facebookresearch/habitat-sim :: src/deps/basis-universal/encoder/basisu_resampler.ll (ZN6basisu9Resampler8put_lineEPKf)

; 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.basisu::Resampler" = type <{ i32, i32, i32, i32, i32, i32, i32, [4 x i8], ptr, ptr, ptr, ptr, i8, i8, i8, [5 x i8], ptr, ptr, ptr, i32, i32, i32, float, float, [4 x i8] }>
%"struct.basisu::Resampler::Scan_Buf" = type { [16384 x i32], [16384 x ptr] }

@.str.1 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu9Resampler8put_lineEPKf = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [37 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6basisu9Resampler10resample_xEPfPKf(ptr noundef nonnull align 8 dereferenceable(116), ptr noundef, ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN6basisuL21resampler_range_checkEii(i32 noundef, i32 noundef) #3

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

14:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %144

15:                                               ; preds = %2
  %16 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 16
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 19
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 3
  %21 = load i32, ptr %20, align 4, !tbaa !16
  %22 = call noundef i32 @_ZN6basisuL21resampler_range_checkEii(i32 noundef %19, i32 noundef %21)
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i32, ptr %17, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !18
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %31, label %27

27:                                               ; preds = %15
  %28 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 19
  %29 = load i32, ptr %28, align 8, !tbaa !9
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %28, align 8, !tbaa !9
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %144

31:                                               ; preds = %15
  store i32 0, ptr %6, align 4, !tbaa !18
  br label %32

32:                                               ; preds = %46, %31
  %33 = load i32, ptr %6, align 4, !tbaa !18
  %34 = icmp slt i32 %33, 16384
  br i1 %34, label %35, label %49

35:                                               ; preds = %32
  %36 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 18
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  %38 = getelementptr inbounds %"struct.basisu::Resampler::Scan_Buf", ptr %37, i32 0, i32 0
  %39 = load i32, ptr %6, align 4, !tbaa !18
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [16384 x i32], ptr %38, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !18
  %43 = icmp eq i32 %42, -1
  br i1 %43, label %44, label %45

44:                                               ; preds = %35
  br label %49

45:                                               ; preds = %35
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %6, align 4, !tbaa !18
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %6, align 4, !tbaa !18
  br label %32, !llvm.loop !20

49:                                               ; preds = %44, %32
  %50 = load i32, ptr %6, align 4, !tbaa !18
  %51 = icmp eq i32 %50, 16384
  br i1 %51, label %52, label %54

52:                                               ; preds = %49
  %53 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 21
  store i32 3, ptr %53, align 8, !tbaa !22
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %144

54:                                               ; preds = %49
  %55 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 17
  %56 = load ptr, ptr %55, align 8, !tbaa !23
  %57 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 19
  %58 = load i32, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 3
  %60 = load i32, ptr %59, align 4, !tbaa !16
  %61 = call noundef i32 @_ZN6basisuL21resampler_range_checkEii(i32 noundef %58, i32 noundef %60)
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %56, i64 %62
  store i8 1, ptr %63, align 1, !tbaa !24
  %64 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 19
  %65 = load i32, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 18
  %67 = load ptr, ptr %66, align 8, !tbaa !19
  %68 = getelementptr inbounds %"struct.basisu::Resampler::Scan_Buf", ptr %67, i32 0, i32 0
  %69 = load i32, ptr %6, align 4, !tbaa !18
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [16384 x i32], ptr %68, i64 0, i64 %70
  store i32 %65, ptr %71, align 4, !tbaa !18
  %72 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 18
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  %74 = getelementptr inbounds %"struct.basisu::Resampler::Scan_Buf", ptr %73, i32 0, i32 1
  %75 = load i32, ptr %6, align 4, !tbaa !18
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [16384 x ptr], ptr %74, i64 0, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %96, label %80

80:                                               ; preds = %54
  %81 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !25
  %83 = sext i32 %82 to i64
  %84 = mul i64 %83, 4
  %85 = call noalias ptr @malloc(i64 noundef %84) #8
  %86 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 18
  %87 = load ptr, ptr %86, align 8, !tbaa !19
  %88 = getelementptr inbounds %"struct.basisu::Resampler::Scan_Buf", ptr %87, i32 0, i32 1
  %89 = load i32, ptr %6, align 4, !tbaa !18
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [16384 x ptr], ptr %88, i64 0, i64 %90
  store ptr %85, ptr %91, align 8, !tbaa !5
  %92 = icmp eq ptr %85, null
  br i1 %92, label %93, label %95

93:                                               ; preds = %80
  %94 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 21
  store i32 1, ptr %94, align 8, !tbaa !22
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %144

95:                                               ; preds = %80
  br label %96

96:                                               ; preds = %95, %54
  %97 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 14
  %98 = load i8, ptr %97, align 2, !tbaa !26, !range !27, !noundef !28
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %122

100:                                              ; preds = %96
  %101 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !25
  %103 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 2
  %104 = load i32, ptr %103, align 8, !tbaa !29
  %105 = icmp eq i32 %102, %104
  br i1 %105, label %106, label %107

106:                                              ; preds = %100
  br label %109

107:                                              ; preds = %100
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 512, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu9Resampler8put_lineEPKf) #9
  unreachable

108:                                              ; No predecessors!
  br label %109

109:                                              ; preds = %108, %106
  %110 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 18
  %111 = load ptr, ptr %110, align 8, !tbaa !19
  %112 = getelementptr inbounds %"struct.basisu::Resampler::Scan_Buf", ptr %111, i32 0, i32 1
  %113 = load i32, ptr %6, align 4, !tbaa !18
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [16384 x ptr], ptr %112, i64 0, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !25
  %120 = sext i32 %119 to i64
  %121 = mul i64 %120, 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %116, ptr align 4 %117, i64 %121, i1 false)
  br label %140

122:                                              ; preds = %96
  %123 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 1
  %124 = load i32, ptr %123, align 4, !tbaa !25
  %125 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 4
  %126 = load i32, ptr %125, align 8, !tbaa !30
  %127 = icmp eq i32 %124, %126
  br i1 %127, label %128, label %129

128:                                              ; preds = %122
  br label %131

129:                                              ; preds = %122
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 519, ptr noundef @__PRETTY_FUNCTION__._ZN6basisu9Resampler8put_lineEPKf) #9
  unreachable

130:                                              ; No predecessors!
  br label %131

131:                                              ; preds = %130, %128
  %132 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 18
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = getelementptr inbounds %"struct.basisu::Resampler::Scan_Buf", ptr %133, i32 0, i32 1
  %135 = load i32, ptr %6, align 4, !tbaa !18
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [16384 x ptr], ptr %134, i64 0, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN6basisu9Resampler10resample_xEPfPKf(ptr noundef nonnull align 8 dereferenceable(116) %8, ptr noundef %138, ptr noundef %139)
  br label %140

140:                                              ; preds = %131, %109
  %141 = getelementptr inbounds %"class.basisu::Resampler", ptr %8, i32 0, i32 19
  %142 = load i32, ptr %141, align 8, !tbaa !9
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %141, align 8, !tbaa !9
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %144

144:                                              ; preds = %140, %93, %52, %27, %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  %145 = load i1, ptr %3, align 1
  ret i1 %145
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #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 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 #4 = { 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 = { nounwind 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { noreturn 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, !11, i64 96}
!10 = !{!"_ZTSN6basisu9ResamplerE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !13, i64 64, !13, i64 65, !13, i64 66, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !14, i64 104, !15, i64 108, !15, i64 112}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN6basisu9Resampler11Boundary_OpE", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN6basisu9Resampler6StatusE", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!10, !11, i64 12}
!17 = !{!10, !6, i64 72}
!18 = !{!11, !11, i64 0}
!19 = !{!10, !6, i64 88}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !14, i64 104}
!23 = !{!10, !6, i64 80}
!24 = !{!7, !7, i64 0}
!25 = !{!10, !11, i64 4}
!26 = !{!10, !13, i64 66}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!10, !11, i64 8}
!30 = !{!10, !11, i64 16}


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

@.str.1 = external hidden unnamed_addr constant [116 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [37 x i8], align 1
@__PRETTY_FUNCTION__._ZN6basisu9Resampler8put_lineEPKf = external hidden unnamed_addr constant [49 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [37 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN6basisuL21resampler_range_checkEii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN6basisu9Resampler8put_lineEPKf(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 96
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 12
  %6 = load i32, ptr %5, align 4, !tbaa !15
  %.not = icmp slt i32 %4, %6
  br i1 %.not, label %7, label %92

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  %9 = load ptr, ptr %8, align 8, !tbaa !16
  %10 = tail call noundef i32 @_ZN6basisuL21resampler_range_checkEii(i32 noundef %4, i32 noundef %6)
  %11 = sext i32 %10 to i64
  %12 = getelementptr inbounds i32, ptr %9, i64 %11
  %13 = load i32, ptr %12, align 4, !tbaa !17
  %.not16 = icmp eq i32 %13, 0
  br i1 %.not16, label %16, label %.preheader

.preheader:                                       ; preds = %7
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  br label %19

16:                                               ; preds = %7
  %17 = load i32, ptr %3, align 8, !tbaa !5
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr %3, align 8, !tbaa !5
  br label %92

19:                                               ; preds = %35, %.preheader
  %indvars.iv = phi i64 [ 0, %.preheader ], [ %indvars.iv.next.3, %35 ]
  %20 = getelementptr inbounds [16384 x i32], ptr %15, i64 0, i64 %indvars.iv
  %21 = load i32, ptr %20, align 4, !tbaa !17
  %22 = icmp eq i32 %21, -1
  br i1 %22, label %.thread, label %23

23:                                               ; preds = %19
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %24 = getelementptr inbounds [16384 x i32], ptr %15, i64 0, i64 %indvars.iv.next
  %25 = load i32, ptr %24, align 4, !tbaa !17
  %26 = icmp eq i32 %25, -1
  br i1 %26, label %.thread, label %27

27:                                               ; preds = %23
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %28 = getelementptr inbounds [16384 x i32], ptr %15, i64 0, i64 %indvars.iv.next.1
  %29 = load i32, ptr %28, align 4, !tbaa !17
  %30 = icmp eq i32 %29, -1
  br i1 %30, label %.thread, label %31

31:                                               ; preds = %27
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %32 = getelementptr inbounds [16384 x i32], ptr %15, i64 0, i64 %indvars.iv.next.2
  %33 = load i32, ptr %32, align 4, !tbaa !17
  %34 = icmp eq i32 %33, -1
  br i1 %34, label %.thread, label %35

35:                                               ; preds = %31
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, 16384
  br i1 %exitcond.not.3, label %36, label %19, !llvm.loop !19

36:                                               ; preds = %35
  %37 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 3, ptr %37, align 8, !tbaa !21
  br label %92

.thread:                                          ; preds = %31, %27, %23, %19
  %indvars.iv.lcssa = phi i64 [ %indvars.iv, %19 ], [ %indvars.iv.next, %23 ], [ %indvars.iv.next.1, %27 ], [ %indvars.iv.next.2, %31 ]
  %38 = getelementptr inbounds i8, ptr %0, i64 80
  %39 = load ptr, ptr %38, align 8, !tbaa !22
  %40 = load i32, ptr %3, align 8, !tbaa !5
  %41 = load i32, ptr %5, align 4, !tbaa !15
  %42 = tail call noundef i32 @_ZN6basisuL21resampler_range_checkEii(i32 noundef %40, i32 noundef %41)
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr %39, i64 %43
  store i8 1, ptr %44, align 1, !tbaa !23
  %45 = load i32, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %14, align 8, !tbaa !18
  %47 = and i64 %indvars.iv.lcssa, 4294967295
  %48 = getelementptr inbounds [16384 x i32], ptr %46, i64 0, i64 %47
  store i32 %45, ptr %48, align 4, !tbaa !17
  %49 = getelementptr inbounds i8, ptr %46, i64 65536
  %50 = getelementptr inbounds [16384 x ptr], ptr %49, i64 0, i64 %47
  %51 = load ptr, ptr %50, align 8, !tbaa !24
  %.not17 = icmp eq ptr %51, null
  br i1 %.not17, label %52, label %61

52:                                               ; preds = %.thread
  %53 = getelementptr inbounds i8, ptr %0, i64 4
  %54 = load i32, ptr %53, align 4, !tbaa !25
  %55 = sext i32 %54 to i64
  %56 = shl nsw i64 %55, 2
  %57 = tail call noalias ptr @malloc(i64 noundef %56) #5
  store ptr %57, ptr %50, align 8, !tbaa !24
  %58 = icmp eq ptr %57, null
  br i1 %58, label %59, label %61

59:                                               ; preds = %52
  %60 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 1, ptr %60, align 8, !tbaa !21
  br label %92

61:                                               ; preds = %52, %.thread
  %62 = getelementptr inbounds i8, ptr %0, i64 66
  %63 = load i8, ptr %62, align 2, !tbaa !26, !range !27, !noundef !28
  %64 = trunc nuw i8 %63 to i1
  %65 = getelementptr inbounds i8, ptr %0, i64 4
  %66 = load i32, ptr %65, align 4, !tbaa !25
  br i1 %64, label %67, label %79

67:                                               ; preds = %61
  %68 = getelementptr inbounds i8, ptr %0, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !29
  %70 = icmp eq i32 %66, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 512, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu9Resampler8put_lineEPKf) #6
  unreachable

72:                                               ; preds = %67
  %73 = load ptr, ptr %14, align 8, !tbaa !18
  %74 = getelementptr inbounds i8, ptr %73, i64 65536
  %75 = getelementptr inbounds [16384 x ptr], ptr %74, i64 0, i64 %47
  %76 = load ptr, ptr %75, align 8, !tbaa !24
  %77 = sext i32 %66 to i64
  %78 = shl nsw i64 %77, 2
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 4 %76, ptr align 4 %1, i64 %78, i1 false)
  br label %89

79:                                               ; preds = %61
  %80 = getelementptr inbounds i8, ptr %0, i64 16
  %81 = load i32, ptr %80, align 8, !tbaa !30
  %82 = icmp eq i32 %66, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 519, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN6basisu9Resampler8put_lineEPKf) #6
  unreachable

84:                                               ; preds = %79
  %85 = load ptr, ptr %14, align 8, !tbaa !18
  %86 = getelementptr inbounds i8, ptr %85, i64 65536
  %87 = getelementptr inbounds [16384 x ptr], ptr %86, i64 0, i64 %47
  %88 = load ptr, ptr %87, align 8, !tbaa !24
  tail call void @_ZN6basisu9Resampler10resample_xEPfPKf(ptr noundef nonnull align 8 dereferenceable(116) %0, ptr noundef %88, ptr noundef %1)
  br label %89

89:                                               ; preds = %84, %72
  %90 = load i32, ptr %3, align 8, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %3, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %2, %89, %59, %36, %16
  %.012 = phi i1 [ false, %36 ], [ true, %89 ], [ false, %59 ], [ true, %16 ], [ false, %2 ]
  ret i1 %.012
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress 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) #4

attributes #0 = { noreturn 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 = { 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 = { 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 allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind allocsize(0) }
attributes #6 = { noreturn 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, !7, i64 96}
!6 = !{!"_ZTSN6basisu9ResamplerE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !12, i64 64, !12, i64 65, !12, i64 66, !11, i64 72, !11, i64 80, !11, i64 88, !7, i64 96, !7, i64 100, !13, i64 104, !14, i64 108, !14, i64 112}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6basisu9Resampler11Boundary_OpE", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!"_ZTSN6basisu9Resampler6StatusE", !8, i64 0}
!14 = !{!"float", !8, i64 0}
!15 = !{!6, !7, i64 12}
!16 = !{!6, !11, i64 72}
!17 = !{!7, !7, i64 0}
!18 = !{!6, !11, i64 88}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !13, i64 104}
!22 = !{!6, !11, i64 80}
!23 = !{!8, !8, i64 0}
!24 = !{!11, !11, i64 0}
!25 = !{!6, !7, i64 4}
!26 = !{!6, !12, i64 66}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!6, !7, i64 8}
!30 = !{!6, !7, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass