; LLVM IR from kkumatani/distant_speech_recognition :: btk20_src/common/mach_ind_io.ll (Z25read_scaled_vectors_rangeP8_IO_FILEPPfPiS3_ii)

; 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.MIN_MAX = type { float, float }

@stderr = external global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [75 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: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; 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
declare dso_local noundef i32 @_Z11read_floatsP8_IO_FILEPfi(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z15read_floatbytesP8_IO_FILEPfi(ptr noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z25read_scaled_vectors_rangeP8_IO_FILEPPfPiS3_ii(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = call noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef %27)
  store i32 %28, ptr %25, align 4, !tbaa !9
  %29 = load i32, ptr %25, align 4, !tbaa !9
  %30 = icmp ne i32 %29, 1447379795
  br i1 %30, label %31, label %32

31:                                               ; preds = %6
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %195

32:                                               ; preds = %6
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = call noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef %33)
  store i32 %34, ptr %21, align 4, !tbaa !9
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = call noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef %35)
  store i32 %36, ptr %22, align 4, !tbaa !9
  %37 = load i32, ptr %13, align 4, !tbaa !9
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %43, label %39

39:                                               ; preds = %32
  %40 = load i32, ptr %13, align 4, !tbaa !9
  %41 = load i32, ptr %22, align 4, !tbaa !9
  %42 = icmp sge i32 %40, %41
  br i1 %42, label %43, label %46

43:                                               ; preds = %39, %32
  %44 = load i32, ptr %22, align 4, !tbaa !9
  %45 = sub nsw i32 %44, 1
  store i32 %45, ptr %13, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %43, %39
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %49, %46
  %51 = load i32, ptr %12, align 4, !tbaa !9
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = icmp sgt i32 %51, %52
  br i1 %53, label %54, label %59

54:                                               ; preds = %50
  %55 = load i32, ptr %21, align 4, !tbaa !9
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %55, ptr %56, align 4, !tbaa !9
  %57 = load i32, ptr %22, align 4, !tbaa !9
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %57, ptr %58, align 4, !tbaa !9
  store i32 -2, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %195

59:                                               ; preds = %50
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = sub nsw i32 %60, %61
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %23, align 4, !tbaa !9
  %64 = load i32, ptr %21, align 4, !tbaa !9
  %65 = load i32, ptr %23, align 4, !tbaa !9
  %66 = mul nsw i32 %64, %65
  store i32 %66, ptr %24, align 4, !tbaa !9
  %67 = load i32, ptr %21, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = mul i64 8, %68
  %70 = call noalias ptr @malloc(i64 noundef %69) #7
  store ptr %70, ptr %14, align 8, !tbaa !5
  %71 = load i32, ptr %21, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = mul i64 4, %72
  %74 = call noalias ptr @malloc(i64 noundef %73) #7
  store ptr %74, ptr %15, align 8, !tbaa !5
  %75 = load i32, ptr %24, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = mul i64 4, %76
  %78 = call noalias ptr @malloc(i64 noundef %77) #7
  store ptr %78, ptr %16, align 8, !tbaa !5
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = icmp eq ptr %79, null
  br i1 %80, label %87, label %81

81:                                               ; preds = %59
  %82 = load ptr, ptr %14, align 8, !tbaa !5
  %83 = icmp eq ptr %82, null
  br i1 %83, label %87, label %84

84:                                               ; preds = %81
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  %86 = icmp eq ptr %85, null
  br i1 %86, label %87, label %90

87:                                               ; preds = %84, %81, %59
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.18) #6
  store i32 0, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %195

90:                                               ; preds = %84
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = load i32, ptr %21, align 4, !tbaa !9
  %94 = mul nsw i32 2, %93
  %95 = call noundef i32 @_Z11read_floatsP8_IO_FILEPfi(ptr noundef %91, ptr noundef %92, i32 noundef %94)
  store i32 %95, ptr %18, align 4, !tbaa !9
  %96 = load i32, ptr %18, align 4, !tbaa !9
  %97 = load i32, ptr %21, align 4, !tbaa !9
  %98 = mul nsw i32 2, %97
  %99 = icmp ne i32 %96, %98
  br i1 %99, label %100, label %103

100:                                              ; preds = %90
  %101 = load ptr, ptr @stderr, align 8, !tbaa !5
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.19) #6
  store i32 0, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %195

103:                                              ; preds = %90
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %104

104:                                              ; preds = %126, %103
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = load i32, ptr %21, align 4, !tbaa !9
  %107 = icmp slt i32 %105, %106
  br i1 %107, label %108, label %129

108:                                              ; preds = %104
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = load i32, ptr %19, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %struct.MIN_MAX, ptr %109, i64 %111
  %113 = getelementptr inbounds %struct.MIN_MAX, ptr %112, i32 0, i32 1
  %114 = load float, ptr %113, align 4, !tbaa !11
  %115 = load ptr, ptr %14, align 8, !tbaa !5
  %116 = load i32, ptr %19, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds %struct.MIN_MAX, ptr %115, i64 %117
  %119 = getelementptr inbounds %struct.MIN_MAX, ptr %118, i32 0, i32 0
  %120 = load float, ptr %119, align 4, !tbaa !14
  %121 = fsub float %114, %120
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = load i32, ptr %19, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds float, ptr %122, i64 %124
  store float %121, ptr %125, align 4, !tbaa !15
  br label %126

126:                                              ; preds = %108
  %127 = load i32, ptr %19, align 4, !tbaa !9
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %19, align 4, !tbaa !9
  br label %104, !llvm.loop !16

129:                                              ; preds = %104
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = load i32, ptr %21, align 4, !tbaa !9
  %133 = mul nsw i32 %131, %132
  %134 = sext i32 %133 to i64
  %135 = mul i64 %134, 1
  %136 = call i32 @fseek(ptr noundef %130, i64 noundef %135, i32 noundef 1)
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  %139 = load i32, ptr %24, align 4, !tbaa !9
  %140 = call noundef i32 @_Z15read_floatbytesP8_IO_FILEPfi(ptr noundef %137, ptr noundef %138, i32 noundef %139)
  store i32 %140, ptr %18, align 4, !tbaa !9
  %141 = load i32, ptr %18, align 4, !tbaa !9
  %142 = load i32, ptr %24, align 4, !tbaa !9
  %143 = icmp ne i32 %141, %142
  br i1 %143, label %144, label %149

144:                                              ; preds = %129
  %145 = load ptr, ptr @stderr, align 8, !tbaa !5
  %146 = load i32, ptr %18, align 4, !tbaa !9
  %147 = load i32, ptr %24, align 4, !tbaa !9
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.20, i32 noundef %146, i32 noundef %147) #6
  store i32 0, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %195

149:                                              ; preds = %129
  %150 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %150, ptr %17, align 8, !tbaa !5
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %151

151:                                              ; preds = %182, %149
  %152 = load i32, ptr %20, align 4, !tbaa !9
  %153 = load i32, ptr %23, align 4, !tbaa !9
  %154 = icmp slt i32 %152, %153
  br i1 %154, label %155, label %185

155:                                              ; preds = %151
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %176, %155
  %157 = load i32, ptr %19, align 4, !tbaa !9
  %158 = load i32, ptr %21, align 4, !tbaa !9
  %159 = icmp slt i32 %157, %158
  br i1 %159, label %160, label %181

160:                                              ; preds = %156
  %161 = load ptr, ptr %15, align 8, !tbaa !5
  %162 = load i32, ptr %19, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds float, ptr %161, i64 %163
  %165 = load float, ptr %164, align 4, !tbaa !15
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = load float, ptr %166, align 4, !tbaa !15
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = load i32, ptr %19, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %struct.MIN_MAX, ptr %168, i64 %170
  %172 = getelementptr inbounds %struct.MIN_MAX, ptr %171, i32 0, i32 0
  %173 = load float, ptr %172, align 4, !tbaa !14
  %174 = call float @llvm.fmuladd.f32(float %165, float %167, float %173)
  %175 = load ptr, ptr %17, align 8, !tbaa !5
  store float %174, ptr %175, align 4, !tbaa !15
  br label %176

176:                                              ; preds = %160
  %177 = load i32, ptr %19, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %19, align 4, !tbaa !9
  %179 = load ptr, ptr %17, align 8, !tbaa !5
  %180 = getelementptr inbounds float, ptr %179, i32 1
  store ptr %180, ptr %17, align 8, !tbaa !5
  br label %156, !llvm.loop !18

181:                                              ; preds = %156
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %20, align 4, !tbaa !9
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %20, align 4, !tbaa !9
  br label %151, !llvm.loop !19

185:                                              ; preds = %151
  %186 = load ptr, ptr %15, align 8, !tbaa !5
  call void @free(ptr noundef %186) #6
  %187 = load ptr, ptr %14, align 8, !tbaa !5
  call void @free(ptr noundef %187) #6
  %188 = load ptr, ptr %16, align 8, !tbaa !5
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %188, ptr %189, align 8, !tbaa !5
  %190 = load i32, ptr %21, align 4, !tbaa !9
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %190, ptr %191, align 4, !tbaa !9
  %192 = load i32, ptr %22, align 4, !tbaa !9
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %192, ptr %193, align 4, !tbaa !9
  %194 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %194, ptr %7, align 4
  store i32 1, ptr %26, align 4
  br label %195

195:                                              ; preds = %185, %144, %100, %87, %54, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %196 = load i32, ptr %7, align 4
  ret i32 %196
}

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 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 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 #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 nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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, !13, i64 4}
!12 = !{!"_ZTS7MIN_MAX", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = !{!13, !13, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}


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

%struct.MIN_MAX = type { float, float }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.18 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [75 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z11read_floatsP8_IO_FILEPfi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z15read_floatbytesP8_IO_FILEPfi(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z25read_scaled_vectors_rangeP8_IO_FILEPPfPiS3_ii(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #1 {
  %7 = tail call noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef %0)
  %.not = icmp eq i32 %7, 1447379795
  br i1 %.not, label %8, label %101

8:                                                ; preds = %6
  %9 = tail call noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef %0)
  %10 = tail call noundef i32 @_Z8read_intP8_IO_FILE(ptr noundef %0)
  %11 = icmp sgt i32 %5, -1
  %.not88 = icmp sgt i32 %10, %5
  %or.cond92 = and i1 %11, %.not88
  %12 = add nsw i32 %10, -1
  %.075 = select i1 %or.cond92, i32 %5, i32 %12
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %4, i32 0)
  %13 = icmp sgt i32 %spec.store.select, %.075
  br i1 %13, label %14, label %15

14:                                               ; preds = %8
  store i32 %9, ptr %2, align 4, !tbaa !5
  store i32 %10, ptr %3, align 4, !tbaa !5
  br label %101

15:                                               ; preds = %8
  %16 = sub nsw i32 %.075, %spec.store.select
  %17 = add nsw i32 %16, 1
  %18 = mul nsw i32 %17, %9
  %19 = sext i32 %9 to i64
  %20 = shl nsw i64 %19, 3
  %21 = tail call noalias ptr @malloc(i64 noundef %20) #6
  %22 = shl nsw i64 %19, 2
  %23 = tail call noalias ptr @malloc(i64 noundef %22) #6
  %24 = sext i32 %18 to i64
  %25 = shl nsw i64 %24, 2
  %26 = tail call noalias ptr @malloc(i64 noundef %25) #6
  %27 = icmp eq ptr %26, null
  %28 = icmp eq ptr %21, null
  %or.cond = or i1 %28, %27
  %29 = icmp eq ptr %23, null
  %or.cond3 = or i1 %29, %or.cond
  br i1 %or.cond3, label %30, label %33

30:                                               ; preds = %15
  %31 = load ptr, ptr @stderr, align 8, !tbaa !9
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.18) #7
  br label %101

33:                                               ; preds = %15
  %34 = shl nsw i32 %9, 1
  %35 = tail call noundef i32 @_Z11read_floatsP8_IO_FILEPfi(ptr noundef %0, ptr noundef nonnull %21, i32 noundef %34)
  %.not89 = icmp eq i32 %35, %34
  br i1 %.not89, label %.preheader94, label %45

.preheader94:                                     ; preds = %33
  %36 = icmp slt i32 %9, 1
  br i1 %36, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader94
  %wide.trip.count = zext nneg i32 %9 to i64
  %min.iters.check = icmp ult i32 %9, 8
  br i1 %min.iters.check, label %.lr.ph.preheader141, label %vector.ph

.lr.ph.preheader141:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %37 = or disjoint i64 %index, 4
  %38 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %index
  %39 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %37
  %wide.vec = load <8 x float>, ptr %38, align 4, !tbaa !11
  %wide.vec113 = load <8 x float>, ptr %39, align 4, !tbaa !11
  %strided.vec = shufflevector <8 x float> %wide.vec, <8 x float> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
  %strided.vec114 = shufflevector <8 x float> %wide.vec113, <8 x float> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
  %strided.vec115 = shufflevector <8 x float> %wide.vec, <8 x float> poison, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
  %strided.vec116 = shufflevector <8 x float> %wide.vec113, <8 x float> poison, <4 x i32> <i32 1, i32 3, i32 5, i32 7>
  %40 = fsub <4 x float> %strided.vec115, %strided.vec
  %41 = fsub <4 x float> %strided.vec116, %strided.vec114
  %42 = getelementptr inbounds float, ptr %23, i64 %index
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  store <4 x float> %40, ptr %42, align 4, !tbaa !11
  store <4 x float> %41, ptr %43, align 4, !tbaa !11
  %index.next = add nuw i64 %index, 8
  %44 = icmp eq i64 %index.next, %n.vec
  br i1 %44, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader141

45:                                               ; preds = %33
  %46 = load ptr, ptr @stderr, align 8, !tbaa !9
  %47 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.19) #7
  br label %101

.lr.ph:                                           ; preds = %.lr.ph.preheader141, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader141 ]
  %48 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %indvars.iv
  %49 = getelementptr inbounds i8, ptr %48, i64 4
  %50 = load float, ptr %49, align 4, !tbaa !17
  %51 = load float, ptr %48, align 4, !tbaa !19
  %52 = fsub float %50, %51
  %53 = getelementptr inbounds float, ptr %23, i64 %indvars.iv
  store float %52, ptr %53, align 4, !tbaa !11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !20

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %.preheader94
  %54 = mul nsw i32 %9, %spec.store.select
  %55 = sext i32 %54 to i64
  %56 = tail call i32 @fseek(ptr noundef %0, i64 noundef %55, i32 noundef 1)
  %57 = tail call noundef i32 @_Z15read_floatbytesP8_IO_FILEPfi(ptr noundef %0, ptr noundef %26, i32 noundef %18)
  %.not90 = icmp eq i32 %57, %18
  br i1 %.not90, label %.preheader93, label %98

.preheader93:                                     ; preds = %._crit_edge
  %.not91100 = icmp slt i32 %16, 0
  %brmerge = or i1 %.not91100, %36
  br i1 %brmerge, label %._crit_edge103, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader93
  %wide.trip.count109 = zext nneg i32 %9 to i64
  %58 = shl nuw nsw i64 %wide.trip.count109, 2
  %scevgep117 = getelementptr i8, ptr %23, i64 %58
  %59 = shl nuw nsw i64 %wide.trip.count109, 3
  %60 = getelementptr i8, ptr %21, i64 %59
  %scevgep118 = getelementptr i8, ptr %60, i64 -4
  %min.iters.check124 = icmp ult i32 %9, 9
  %n.mod.vf126 = and i64 %wide.trip.count109, 7
  %61 = icmp eq i64 %n.mod.vf126, 0
  %62 = select i1 %61, i64 8, i64 %n.mod.vf126
  %n.vec127 = sub nsw i64 %wide.trip.count109, %62
  %63 = shl nsw i64 %n.vec127, 2
  %64 = add nsw i64 %wide.trip.count109, -1
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge99.us
  %.076102.us = phi ptr [ %.lcssa, %._crit_edge99.us ], [ %26, %.preheader.us.preheader ]
  %.077101.us = phi i32 [ %97, %._crit_edge99.us ], [ 0, %.preheader.us.preheader ]
  br i1 %min.iters.check124, label %scalar.ph123.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %.preheader.us
  %scevgep = getelementptr i8, ptr %.076102.us, i64 %58
  %bound0 = icmp ult ptr %.076102.us, %scevgep117
  %bound1 = icmp ult ptr %23, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound0119 = icmp ult ptr %.076102.us, %scevgep118
  %bound1120 = icmp ult ptr %21, %scevgep
  %found.conflict121 = and i1 %bound0119, %bound1120
  %conflict.rdx = or i1 %found.conflict, %found.conflict121
  br i1 %conflict.rdx, label %scalar.ph123.preheader, label %vector.ph125

vector.ph125:                                     ; preds = %vector.memcheck
  %ind.end = getelementptr i8, ptr %.076102.us, i64 %63
  br label %vector.body130

vector.body130:                                   ; preds = %vector.body130, %vector.ph125
  %index131 = phi i64 [ 0, %vector.ph125 ], [ %index.next140, %vector.body130 ]
  %65 = or disjoint i64 %index131, 4
  %offset.idx = shl i64 %index131, 2
  %next.gep = getelementptr i8, ptr %.076102.us, i64 %offset.idx
  %66 = getelementptr inbounds float, ptr %23, i64 %index131
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %wide.load = load <4 x float>, ptr %66, align 4, !tbaa !11, !alias.scope !21
  %wide.load133 = load <4 x float>, ptr %67, align 4, !tbaa !11, !alias.scope !21
  %68 = getelementptr i8, ptr %next.gep, i64 16
  %wide.load134 = load <4 x float>, ptr %next.gep, align 4, !tbaa !11, !alias.scope !24, !noalias !26
  %wide.load135 = load <4 x float>, ptr %68, align 4, !tbaa !11, !alias.scope !24, !noalias !26
  %69 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %index131
  %70 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %65
  %wide.vec136 = load <8 x float>, ptr %69, align 4, !tbaa !19
  %wide.vec137 = load <8 x float>, ptr %70, align 4, !tbaa !19
  %strided.vec138 = shufflevector <8 x float> %wide.vec136, <8 x float> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
  %strided.vec139 = shufflevector <8 x float> %wide.vec137, <8 x float> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6>
  %71 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load, <4 x float> %wide.load134, <4 x float> %strided.vec138)
  %72 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load133, <4 x float> %wide.load135, <4 x float> %strided.vec139)
  store <4 x float> %71, ptr %next.gep, align 4, !tbaa !11, !alias.scope !24, !noalias !26
  store <4 x float> %72, ptr %68, align 4, !tbaa !11, !alias.scope !24, !noalias !26
  %index.next140 = add nuw i64 %index131, 8
  %73 = icmp eq i64 %index.next140, %n.vec127
  br i1 %73, label %scalar.ph123.preheader, label %vector.body130, !llvm.loop !28

scalar.ph123.preheader:                           ; preds = %vector.body130, %vector.memcheck, %.preheader.us
  %indvars.iv106.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.preheader.us ], [ %n.vec127, %vector.body130 ]
  %.197.us.ph = phi ptr [ %.076102.us, %vector.memcheck ], [ %.076102.us, %.preheader.us ], [ %ind.end, %vector.body130 ]
  %74 = sub nsw i64 %wide.trip.count109, %indvars.iv106.ph
  %xtraiter = and i64 %74, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph123.prol.loopexit, label %scalar.ph123.prol

scalar.ph123.prol:                                ; preds = %scalar.ph123.preheader
  %75 = getelementptr inbounds float, ptr %23, i64 %indvars.iv106.ph
  %76 = load float, ptr %75, align 4, !tbaa !11
  %77 = load float, ptr %.197.us.ph, align 4, !tbaa !11
  %78 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %indvars.iv106.ph
  %79 = load float, ptr %78, align 4, !tbaa !19
  %80 = tail call float @llvm.fmuladd.f32(float %76, float %77, float %79)
  store float %80, ptr %.197.us.ph, align 4, !tbaa !11
  %indvars.iv.next107.prol = add nuw nsw i64 %indvars.iv106.ph, 1
  %81 = getelementptr inbounds i8, ptr %.197.us.ph, i64 4
  br label %scalar.ph123.prol.loopexit

scalar.ph123.prol.loopexit:                       ; preds = %scalar.ph123.prol, %scalar.ph123.preheader
  %.lcssa.unr = phi ptr [ poison, %scalar.ph123.preheader ], [ %81, %scalar.ph123.prol ]
  %indvars.iv106.unr = phi i64 [ %indvars.iv106.ph, %scalar.ph123.preheader ], [ %indvars.iv.next107.prol, %scalar.ph123.prol ]
  %.197.us.unr = phi ptr [ %.197.us.ph, %scalar.ph123.preheader ], [ %81, %scalar.ph123.prol ]
  %82 = icmp eq i64 %indvars.iv106.ph, %64
  br i1 %82, label %._crit_edge99.us, label %scalar.ph123

scalar.ph123:                                     ; preds = %scalar.ph123.prol.loopexit, %scalar.ph123
  %indvars.iv106 = phi i64 [ %indvars.iv.next107.1, %scalar.ph123 ], [ %indvars.iv106.unr, %scalar.ph123.prol.loopexit ]
  %.197.us = phi ptr [ %96, %scalar.ph123 ], [ %.197.us.unr, %scalar.ph123.prol.loopexit ]
  %83 = getelementptr inbounds float, ptr %23, i64 %indvars.iv106
  %84 = load float, ptr %83, align 4, !tbaa !11
  %85 = load float, ptr %.197.us, align 4, !tbaa !11
  %86 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %indvars.iv106
  %87 = load float, ptr %86, align 4, !tbaa !19
  %88 = tail call float @llvm.fmuladd.f32(float %84, float %85, float %87)
  store float %88, ptr %.197.us, align 4, !tbaa !11
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %89 = getelementptr inbounds i8, ptr %.197.us, i64 4
  %90 = getelementptr inbounds float, ptr %23, i64 %indvars.iv.next107
  %91 = load float, ptr %90, align 4, !tbaa !11
  %92 = load float, ptr %89, align 4, !tbaa !11
  %93 = getelementptr inbounds %struct.MIN_MAX, ptr %21, i64 %indvars.iv.next107
  %94 = load float, ptr %93, align 4, !tbaa !19
  %95 = tail call float @llvm.fmuladd.f32(float %91, float %92, float %94)
  store float %95, ptr %89, align 4, !tbaa !11
  %indvars.iv.next107.1 = add nuw nsw i64 %indvars.iv106, 2
  %96 = getelementptr inbounds i8, ptr %.197.us, i64 8
  %exitcond110.not.1 = icmp eq i64 %indvars.iv.next107.1, %wide.trip.count109
  br i1 %exitcond110.not.1, label %._crit_edge99.us, label %scalar.ph123, !llvm.loop !29

._crit_edge99.us:                                 ; preds = %scalar.ph123, %scalar.ph123.prol.loopexit
  %.lcssa = phi ptr [ %.lcssa.unr, %scalar.ph123.prol.loopexit ], [ %96, %scalar.ph123 ]
  %97 = add nuw i32 %.077101.us, 1
  %exitcond111.not = icmp eq i32 %.077101.us, %16
  br i1 %exitcond111.not, label %._crit_edge103, label %.preheader.us, !llvm.loop !30

98:                                               ; preds = %._crit_edge
  %99 = load ptr, ptr @stderr, align 8, !tbaa !9
  %100 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef nonnull @.str.20, i32 noundef %57, i32 noundef %18) #7
  br label %101

._crit_edge103:                                   ; preds = %._crit_edge99.us, %.preheader93
  tail call void @free(ptr noundef nonnull %23) #8
  tail call void @free(ptr noundef nonnull %21) #8
  store ptr %26, ptr %1, align 8, !tbaa !9
  store i32 %9, ptr %2, align 4, !tbaa !5
  store i32 %10, ptr %3, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %6, %._crit_edge103, %98, %45, %30, %14
  %.0 = phi i32 [ -2, %14 ], [ 0, %30 ], [ 0, %45 ], [ 0, %98 ], [ %17, %._crit_edge103 ], [ -1, %6 ]
  ret i32 %.0
}

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #5

attributes #0 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { cold nounwind }
attributes #8 = { 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 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = !{!18, !12, i64 4}
!18 = !{!"_ZTS7MIN_MAX", !12, i64 0, !12, i64 4}
!19 = !{!18, !12, i64 0}
!20 = distinct !{!20, !14, !16, !15}
!21 = !{!22}
!22 = distinct !{!22, !23}
!23 = distinct !{!23, !"LVerDomain"}
!24 = !{!25}
!25 = distinct !{!25, !23}
!26 = !{!22, !27}
!27 = distinct !{!27, !23}
!28 = distinct !{!28, !14, !15, !16}
!29 = distinct !{!29, !14, !15}
!30 = distinct !{!30, !14}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass