; LLVM IR from jgaeddert/liquid-dsp :: examples (msequence_autocorr_example)

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

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 5, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %16 = load i32, ptr %6, align 4, !tbaa !5
  %17 = call ptr @msequence_create_default(i32 noundef %16)
  store ptr %17, ptr %7, align 8, !tbaa !9
  %18 = load ptr, ptr %7, align 8, !tbaa !9
  %19 = call i32 @msequence_print(ptr noundef %18)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %20 = load ptr, ptr %7, align 8, !tbaa !9
  %21 = call i32 @msequence_get_length(ptr noundef %20)
  store i32 %21, ptr %8, align 4, !tbaa !5
  %22 = load i32, ptr %8, align 4, !tbaa !5
  %23 = zext i32 %22 to i64
  %24 = call ptr @llvm.stacksave.p0()
  store ptr %24, ptr %9, align 8
  %25 = alloca i32, i64 %23, align 16
  store i64 %23, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %26 = load i32, ptr %8, align 4, !tbaa !5
  %27 = call ptr @bsequence_create(i32 noundef %26)
  store ptr %27, ptr %11, align 8, !tbaa !9
  %28 = load ptr, ptr %11, align 8, !tbaa !9
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = call i32 @bsequence_init_msequence(ptr noundef %28, ptr noundef %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %31 = load i32, ptr %8, align 4, !tbaa !5
  %32 = call ptr @bsequence_create(i32 noundef %31)
  store ptr %32, ptr %12, align 8, !tbaa !9
  %33 = load ptr, ptr %12, align 8, !tbaa !9
  %34 = load ptr, ptr %7, align 8, !tbaa !9
  %35 = call i32 @bsequence_init_msequence(ptr noundef %33, ptr noundef %34)
  %36 = load ptr, ptr %11, align 8, !tbaa !9
  %37 = load ptr, ptr %12, align 8, !tbaa !9
  %38 = call i32 @bsequence_correlate(ptr noundef %36, ptr noundef %37)
  %39 = mul nsw i32 2, %38
  %40 = load i32, ptr %8, align 4, !tbaa !5
  %41 = sub i32 %39, %40
  %42 = getelementptr inbounds i32, ptr %25, i64 0
  store i32 %41, ptr %42, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %59, %2
  %44 = load i32, ptr %13, align 4, !tbaa !5
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = icmp ult i32 %44, %45
  br i1 %46, label %47, label %62

47:                                               ; preds = %43
  %48 = load ptr, ptr %11, align 8, !tbaa !9
  %49 = load ptr, ptr %12, align 8, !tbaa !9
  %50 = call i32 @bsequence_correlate(ptr noundef %48, ptr noundef %49)
  %51 = mul nsw i32 2, %50
  %52 = load i32, ptr %8, align 4, !tbaa !5
  %53 = sub i32 %51, %52
  %54 = load i32, ptr %13, align 4, !tbaa !5
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds i32, ptr %25, i64 %55
  store i32 %53, ptr %56, align 4, !tbaa !5
  %57 = load ptr, ptr %12, align 8, !tbaa !9
  %58 = call i32 @bsequence_circshift(ptr noundef %57)
  br label %59

59:                                               ; preds = %47
  %60 = load i32, ptr %13, align 4, !tbaa !5
  %61 = add i32 %60, 1
  store i32 %61, ptr %13, align 4, !tbaa !5
  br label %43, !llvm.loop !11

62:                                               ; preds = %43
  %63 = load i32, ptr %8, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = alloca i32, i64 %64, align 16
  store i64 %64, ptr %14, align 8
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %77, %62
  %67 = load i32, ptr %13, align 4, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !5
  %69 = icmp ult i32 %67, %68
  br i1 %69, label %70, label %80

70:                                               ; preds = %66
  %71 = load ptr, ptr %11, align 8, !tbaa !9
  %72 = load i32, ptr %13, align 4, !tbaa !5
  %73 = call i32 @bsequence_index(ptr noundef %71, i32 noundef %72)
  %74 = load i32, ptr %13, align 4, !tbaa !5
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %65, i64 %75
  store i32 %73, ptr %76, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %70
  %78 = load i32, ptr %13, align 4, !tbaa !5
  %79 = add i32 %78, 1
  store i32 %79, ptr %13, align 4, !tbaa !5
  br label %66, !llvm.loop !13

80:                                               ; preds = %66
  %81 = load ptr, ptr %11, align 8, !tbaa !9
  %82 = call i32 @bsequence_destroy(ptr noundef %81)
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  %84 = call i32 @bsequence_destroy(ptr noundef %83)
  %85 = load ptr, ptr %7, align 8, !tbaa !9
  %86 = call i32 @msequence_destroy(ptr noundef %85)
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %98, %80
  %88 = load i32, ptr %13, align 4, !tbaa !5
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = icmp ult i32 %88, %89
  br i1 %90, label %91, label %101

91:                                               ; preds = %87
  %92 = load i32, ptr %13, align 4, !tbaa !5
  %93 = load i32, ptr %13, align 4, !tbaa !5
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds i32, ptr %25, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %92, i32 noundef %96)
  br label %98

98:                                               ; preds = %91
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = add i32 %99, 1
  store i32 %100, ptr %13, align 4, !tbaa !5
  br label %87, !llvm.loop !14

101:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %102 = call noalias ptr @fopen(ptr noundef @.str.1, ptr noundef @.str.2)
  store ptr %102, ptr %15, align 8, !tbaa !9
  %103 = load ptr, ptr %15, align 8, !tbaa !9
  %104 = icmp ne ptr %103, null
  br i1 %104, label %111, label %105

105:                                              ; preds = %101
  %106 = load ptr, ptr @stderr, align 8, !tbaa !9
  %107 = load ptr, ptr %5, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %107, i64 0
  %109 = load ptr, ptr %108, align 8, !tbaa !9
  %110 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %106, ptr noundef @.str.3, ptr noundef %109, ptr noundef @.str.1) #6
  call void @exit(i32 noundef 1) #7
  unreachable

111:                                              ; preds = %101
  %112 = load ptr, ptr %15, align 8, !tbaa !9
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.4, ptr noundef @.str.1) #6
  %114 = load ptr, ptr %15, align 8, !tbaa !9
  %115 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.5) #6
  %116 = load ptr, ptr %15, align 8, !tbaa !9
  %117 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %116, ptr noundef @.str.6) #6
  %118 = load ptr, ptr %15, align 8, !tbaa !9
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str.7, i32 noundef %119) #6
  %121 = load ptr, ptr %15, align 8, !tbaa !9
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %121, ptr noundef @.str.8) #6
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %123

123:                                              ; preds = %149, %111
  %124 = load i32, ptr %13, align 4, !tbaa !5
  %125 = load i32, ptr %8, align 4, !tbaa !5
  %126 = icmp ult i32 %124, %125
  br i1 %126, label %127, label %152

127:                                              ; preds = %123
  %128 = load ptr, ptr %15, align 8, !tbaa !9
  %129 = load i32, ptr %13, align 4, !tbaa !5
  %130 = add i32 %129, 1
  %131 = load i32, ptr %13, align 4, !tbaa !5
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %65, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.9, i32 noundef %130, i32 noundef %134) #6
  %136 = load ptr, ptr %15, align 8, !tbaa !9
  %137 = load i32, ptr %13, align 4, !tbaa !5
  %138 = add i32 %137, 1
  %139 = load i32, ptr %13, align 4, !tbaa !5
  %140 = zext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %25, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = sitofp i32 %142 to float
  %144 = load i32, ptr %8, align 4, !tbaa !5
  %145 = uitofp i32 %144 to float
  %146 = fdiv float %143, %145
  %147 = fpext float %146 to double
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.10, i32 noundef %138, double noundef %147) #6
  br label %149

149:                                              ; preds = %127
  %150 = load i32, ptr %13, align 4, !tbaa !5
  %151 = add i32 %150, 1
  store i32 %151, ptr %13, align 4, !tbaa !5
  br label %123, !llvm.loop !15

152:                                              ; preds = %123
  %153 = load ptr, ptr %15, align 8, !tbaa !9
  %154 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %153, ptr noundef @.str.11) #6
  %155 = load ptr, ptr %15, align 8, !tbaa !9
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %155, ptr noundef @.str.12) #6
  %157 = load ptr, ptr %15, align 8, !tbaa !9
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.13) #6
  %159 = load ptr, ptr %15, align 8, !tbaa !9
  %160 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef @.str.14) #6
  %161 = load ptr, ptr %15, align 8, !tbaa !9
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.15) #6
  %163 = load ptr, ptr %15, align 8, !tbaa !9
  %164 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %163, ptr noundef @.str.16) #6
  %165 = load ptr, ptr %15, align 8, !tbaa !9
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.17) #6
  %167 = load ptr, ptr %15, align 8, !tbaa !9
  %168 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %167, ptr noundef @.str.18) #6
  %169 = load ptr, ptr %15, align 8, !tbaa !9
  %170 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %169, ptr noundef @.str.19) #6
  %171 = load ptr, ptr %15, align 8, !tbaa !9
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.20) #6
  %173 = load ptr, ptr %15, align 8, !tbaa !9
  %174 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef @.str.21) #6
  %175 = load ptr, ptr %15, align 8, !tbaa !9
  %176 = call i32 @fclose(ptr noundef %175)
  %177 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, ptr noundef @.str.1)
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %178 = load ptr, ptr %9, align 8
  call void @llvm.stackrestore.p0(ptr %178)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %179 = load i32, ptr %3, align 4
  ret i32 %179
}

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

declare ptr @msequence_create_default(i32 noundef) #2

declare i32 @msequence_print(ptr noundef) #2

declare i32 @msequence_get_length(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

declare ptr @bsequence_create(i32 noundef) #2

declare i32 @bsequence_init_msequence(ptr noundef, ptr noundef) #2

declare i32 @bsequence_correlate(ptr noundef, ptr noundef) #2

declare i32 @bsequence_circshift(ptr noundef) #2

declare i32 @bsequence_index(ptr noundef, i32 noundef) #2

declare i32 @bsequence_destroy(ptr noundef) #2

declare i32 @msequence_destroy(ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

declare i32 @fclose(ptr noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; 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 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = tail call ptr @msequence_create_default(i32 noundef 5) #4
  %4 = tail call i32 @msequence_print(ptr noundef %3) #4
  %5 = tail call i32 @msequence_get_length(ptr noundef %3) #4
  %6 = zext i32 %5 to i64
  %7 = alloca i32, i64 %6, align 16
  %8 = tail call ptr @bsequence_create(i32 noundef %5) #4
  %9 = tail call i32 @bsequence_init_msequence(ptr noundef %8, ptr noundef %3) #4
  %10 = tail call ptr @bsequence_create(i32 noundef %5) #4
  %11 = tail call i32 @bsequence_init_msequence(ptr noundef %10, ptr noundef %3) #4
  %12 = tail call i32 @bsequence_correlate(ptr noundef %8, ptr noundef %10) #4
  %13 = shl nsw i32 %12, 1
  %14 = sub i32 %13, %5
  store i32 %14, ptr %7, align 16, !tbaa !5
  %.not83 = icmp eq i32 %5, 0
  br i1 %.not83, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %2
  %15 = alloca i32, i64 %6, align 16
  br label %._crit_edge74

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %16 = tail call i32 @bsequence_correlate(ptr noundef %8, ptr noundef %10) #4
  %17 = shl nsw i32 %16, 1
  %18 = sub i32 %17, %5
  %19 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv
  store i32 %18, ptr %19, align 4, !tbaa !5
  %20 = tail call i32 @bsequence_circshift(ptr noundef %10) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %6
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph
  %21 = alloca i32, i64 %6, align 16
  br i1 %.not83, label %._crit_edge74, label %.lr.ph73

.lr.ph73:                                         ; preds = %._crit_edge, %.lr.ph73
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %.lr.ph73 ], [ 0, %._crit_edge ]
  %22 = trunc nuw i64 %indvars.iv88 to i32
  %23 = tail call i32 @bsequence_index(ptr noundef %8, i32 noundef %22) #4
  %24 = getelementptr inbounds i32, ptr %21, i64 %indvars.iv88
  store i32 %23, ptr %24, align 4, !tbaa !5
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %6
  br i1 %exitcond92.not, label %._crit_edge74, label %.lr.ph73, !llvm.loop !11

._crit_edge74:                                    ; preds = %.lr.ph73, %._crit_edge.thread, %._crit_edge
  %25 = phi ptr [ %15, %._crit_edge.thread ], [ %21, %._crit_edge ], [ %21, %.lr.ph73 ]
  %26 = tail call i32 @bsequence_destroy(ptr noundef %8) #4
  %27 = tail call i32 @bsequence_destroy(ptr noundef %10) #4
  %28 = tail call i32 @msequence_destroy(ptr noundef %3) #4
  br i1 %.not83, label %._crit_edge78, label %.lr.ph77

.lr.ph77:                                         ; preds = %._crit_edge74, %.lr.ph77
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %.lr.ph77 ], [ 0, %._crit_edge74 ]
  %29 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv93
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = trunc nuw i64 %indvars.iv93 to i32
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %31, i32 noundef %30)
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond97.not = icmp eq i64 %indvars.iv.next94, %6
  br i1 %exitcond97.not, label %._crit_edge78, label %.lr.ph77, !llvm.loop !12

._crit_edge78:                                    ; preds = %.lr.ph77, %._crit_edge74
  %33 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2)
  %.not = icmp eq ptr %33, null
  br i1 %.not, label %34, label %38

34:                                               ; preds = %._crit_edge78
  %35 = load ptr, ptr @stderr, align 8, !tbaa !13
  %36 = load ptr, ptr %1, align 8, !tbaa !13
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.3, ptr noundef %36, ptr noundef nonnull @.str.1) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

38:                                               ; preds = %._crit_edge78
  %39 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1) #4
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.5) #4
  %41 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.6) #4
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.7, i32 noundef %5) #4
  %43 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.8) #4
  br i1 %.not83, label %._crit_edge82, label %.lr.ph81

.lr.ph81:                                         ; preds = %38
  %44 = uitofp i32 %5 to float
  br label %45

45:                                               ; preds = %.lr.ph81, %45
  %indvars.iv98 = phi i64 [ 0, %.lr.ph81 ], [ %indvars.iv.next99, %45 ]
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %46 = getelementptr inbounds i32, ptr %25, i64 %indvars.iv98
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = trunc nuw i64 %indvars.iv.next99 to i32
  %49 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.9, i32 noundef %48, i32 noundef %47) #4
  %50 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv98
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = sitofp i32 %51 to float
  %53 = fdiv float %52, %44
  %54 = fpext float %53 to double
  %55 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.10, i32 noundef %48, double noundef %54) #4
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %6
  br i1 %exitcond102.not, label %._crit_edge82, label %45, !llvm.loop !15

._crit_edge82:                                    ; preds = %45, %38
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.11) #4
  %57 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.12) #4
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.13) #4
  %59 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.14) #4
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.15) #4
  %61 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.16) #4
  %62 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.17) #4
  %63 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.18) #4
  %64 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.19) #4
  %65 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.20) #4
  %66 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %33, ptr noundef nonnull @.str.21) #4
  %67 = tail call i32 @fclose(ptr noundef nonnull %33)
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, ptr noundef nonnull @.str.1)
  ret i32 0
}

declare ptr @msequence_create_default(i32 noundef) local_unnamed_addr #1

declare i32 @msequence_print(ptr noundef) local_unnamed_addr #1

declare i32 @msequence_get_length(ptr noundef) local_unnamed_addr #1

declare ptr @bsequence_create(i32 noundef) local_unnamed_addr #1

declare i32 @bsequence_init_msequence(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @bsequence_correlate(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @bsequence_circshift(ptr noundef) local_unnamed_addr #1

declare i32 @bsequence_index(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @bsequence_destroy(ptr noundef) local_unnamed_addr #1

declare i32 @msequence_destroy(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

attributes #0 = { 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 #1 = { "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 = { 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { cold nounwind }
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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !10}


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