; LLVM IR from harharkh/sb_desc :: src (vector)

; 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.sb_vec = type { i64, ptr, i8 }

@sb_error_log = external global ptr, align 8
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [33 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @abort() #1

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fma.f64(double, double, double) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @sb_vec_is_finite(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @sb_vec_rvsw(ptr noalias noundef %0, ptr noalias noundef %1, ptr noalias noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %3
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %33, label %14

14:                                               ; preds = %11
  %15 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %17, label %19

17:                                               ; preds = %14
  %18 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %21

19:                                               ; preds = %14
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %21

21:                                               ; preds = %19, %17
  %22 = phi ptr [ %18, %17 ], [ %20, %19 ]
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef @.str.92) #5
  %24 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %21
  %27 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %30

28:                                               ; preds = %21
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %28, %26
  %31 = phi ptr [ %27, %26 ], [ %29, %28 ]
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

33:                                               ; preds = %11
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %57, label %38

38:                                               ; preds = %35
  %39 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %38
  %42 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %45

43:                                               ; preds = %38
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %43, %41
  %46 = phi ptr [ %42, %41 ], [ %44, %43 ]
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef @.str.93) #5
  %48 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %52

50:                                               ; preds = %45
  %51 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %54

52:                                               ; preds = %45
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %52, %50
  %55 = phi ptr [ %51, %50 ], [ %53, %52 ]
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

57:                                               ; preds = %35
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %81, label %62

62:                                               ; preds = %59
  %63 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %67

65:                                               ; preds = %62
  %66 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %69

67:                                               ; preds = %62
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %67, %65
  %70 = phi ptr [ %66, %65 ], [ %68, %67 ]
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef @.str.94) #5
  %72 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %76

74:                                               ; preds = %69
  %75 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %78

76:                                               ; preds = %69
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %76, %74
  %79 = phi ptr [ %75, %74 ], [ %77, %76 ]
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

81:                                               ; preds = %59
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.sb_vec, ptr %84, i32 0, i32 2
  %86 = load i8, ptr %85, align 8, !tbaa !9
  %87 = sext i8 %86 to i32
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.sb_vec, ptr %88, i32 0, i32 2
  %90 = load i8, ptr %89, align 8, !tbaa !9
  %91 = sext i8 %90 to i32
  %92 = icmp ne i32 %87, %91
  br i1 %92, label %93, label %112

93:                                               ; preds = %83
  %94 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %98

96:                                               ; preds = %93
  %97 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %100

98:                                               ; preds = %93
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %98, %96
  %101 = phi ptr [ %97, %96 ], [ %99, %98 ]
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %101, ptr noundef @.str.95) #5
  %103 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %107

105:                                              ; preds = %100
  %106 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %109

107:                                              ; preds = %100
  %108 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %107, %105
  %110 = phi ptr [ %106, %105 ], [ %108, %107 ]
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

112:                                              ; preds = %83
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.sb_vec, ptr %115, i32 0, i32 2
  %117 = load i8, ptr %116, align 8, !tbaa !9
  %118 = sext i8 %117 to i32
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.sb_vec, ptr %119, i32 0, i32 2
  %121 = load i8, ptr %120, align 8, !tbaa !9
  %122 = sext i8 %121 to i32
  %123 = icmp ne i32 %118, %122
  br i1 %123, label %124, label %143

124:                                              ; preds = %114
  %125 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %129

127:                                              ; preds = %124
  %128 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %131

129:                                              ; preds = %124
  %130 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %131

131:                                              ; preds = %129, %127
  %132 = phi ptr [ %128, %127 ], [ %130, %129 ]
  %133 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef @.str.96) #5
  %134 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %135 = icmp ne ptr %134, null
  br i1 %135, label %136, label %138

136:                                              ; preds = %131
  %137 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %140

138:                                              ; preds = %131
  %139 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %140

140:                                              ; preds = %138, %136
  %141 = phi ptr [ %137, %136 ], [ %139, %138 ]
  %142 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

143:                                              ; preds = %114
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.sb_vec, ptr %146, i32 0, i32 0
  %148 = load i64, ptr %147, align 8, !tbaa !12
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.sb_vec, ptr %149, i32 0, i32 0
  %151 = load i64, ptr %150, align 8, !tbaa !12
  %152 = icmp ne i64 %148, %151
  br i1 %152, label %153, label %172

153:                                              ; preds = %145
  %154 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %155 = icmp ne ptr %154, null
  br i1 %155, label %156, label %158

156:                                              ; preds = %153
  %157 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %160

158:                                              ; preds = %153
  %159 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %160

160:                                              ; preds = %158, %156
  %161 = phi ptr [ %157, %156 ], [ %159, %158 ]
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %161, ptr noundef @.str.97) #5
  %163 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %164 = icmp ne ptr %163, null
  br i1 %164, label %165, label %167

165:                                              ; preds = %160
  %166 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %169

167:                                              ; preds = %160
  %168 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %169

169:                                              ; preds = %167, %165
  %170 = phi ptr [ %166, %165 ], [ %168, %167 ]
  %171 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

172:                                              ; preds = %145
  br label %173

173:                                              ; preds = %172
  br label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.sb_vec, ptr %175, i32 0, i32 0
  %177 = load i64, ptr %176, align 8, !tbaa !12
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.sb_vec, ptr %178, i32 0, i32 0
  %180 = load i64, ptr %179, align 8, !tbaa !12
  %181 = icmp ne i64 %177, %180
  br i1 %181, label %182, label %201

182:                                              ; preds = %174
  %183 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %184 = icmp ne ptr %183, null
  br i1 %184, label %185, label %187

185:                                              ; preds = %182
  %186 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %189

187:                                              ; preds = %182
  %188 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %189

189:                                              ; preds = %187, %185
  %190 = phi ptr [ %186, %185 ], [ %188, %187 ]
  %191 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %190, ptr noundef @.str.98) #5
  %192 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %193 = icmp ne ptr %192, null
  br i1 %193, label %194, label %196

194:                                              ; preds = %189
  %195 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %198

196:                                              ; preds = %189
  %197 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %198

198:                                              ; preds = %196, %194
  %199 = phi ptr [ %195, %194 ], [ %197, %196 ]
  %200 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %199, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

201:                                              ; preds = %174
  br label %202

202:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %203 = load ptr, ptr %4, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.sb_vec, ptr %203, i32 0, i32 1
  %205 = load ptr, ptr %204, align 8, !tbaa !13
  store ptr %205, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.sb_vec, ptr %206, i32 0, i32 1
  %208 = load ptr, ptr %207, align 8, !tbaa !13
  store ptr %208, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %209 = load ptr, ptr %6, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.sb_vec, ptr %209, i32 0, i32 1
  %211 = load ptr, ptr %210, align 8, !tbaa !13
  store ptr %211, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !14
  br label %212

212:                                              ; preds = %237, %202
  %213 = load i64, ptr %10, align 8, !tbaa !14
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.sb_vec, ptr %214, i32 0, i32 0
  %216 = load i64, ptr %215, align 8, !tbaa !12
  %217 = icmp ult i64 %213, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %240

219:                                              ; preds = %212
  %220 = load ptr, ptr %7, align 8, !tbaa !5
  %221 = load i64, ptr %10, align 8, !tbaa !14
  %222 = getelementptr inbounds double, ptr %220, i64 %221
  %223 = load double, ptr %222, align 8, !tbaa !15
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  %225 = load i64, ptr %10, align 8, !tbaa !14
  %226 = getelementptr inbounds double, ptr %224, i64 %225
  %227 = load double, ptr %226, align 8, !tbaa !15
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = load i64, ptr %10, align 8, !tbaa !14
  %230 = getelementptr inbounds double, ptr %228, i64 %229
  %231 = load double, ptr %230, align 8, !tbaa !15
  %232 = fneg double %231
  %233 = call double @llvm.fma.f64(double %223, double %227, double %232)
  %234 = load ptr, ptr %7, align 8, !tbaa !5
  %235 = load i64, ptr %10, align 8, !tbaa !14
  %236 = getelementptr inbounds double, ptr %234, i64 %235
  store double %233, ptr %236, align 8, !tbaa !15
  br label %237

237:                                              ; preds = %219
  %238 = load i64, ptr %10, align 8, !tbaa !14
  %239 = add i64 %238, 1
  store i64 %239, ptr %10, align 8, !tbaa !14
  br label %212, !llvm.loop !17

240:                                              ; preds = %218
  br label %241

241:                                              ; preds = %240
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = call i32 @sb_vec_is_finite(ptr noundef %242)
  %244 = icmp ne i32 %243, 0
  br i1 %244, label %264, label %245

245:                                              ; preds = %241
  %246 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %247 = icmp ne ptr %246, null
  br i1 %247, label %248, label %250

248:                                              ; preds = %245
  %249 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %252

250:                                              ; preds = %245
  %251 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %252

252:                                              ; preds = %250, %248
  %253 = phi ptr [ %249, %248 ], [ %251, %250 ]
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %253, ptr noundef @.str.99) #5
  %255 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  %256 = icmp ne ptr %255, null
  br i1 %256, label %257, label %259

257:                                              ; preds = %252
  %258 = load ptr, ptr @sb_error_log, align 8, !tbaa !5
  br label %261

259:                                              ; preds = %252
  %260 = load ptr, ptr @stderr, align 8, !tbaa !5
  br label %261

261:                                              ; preds = %259, %257
  %262 = phi ptr [ %258, %257 ], [ %260, %259 ]
  %263 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %262, ptr noundef @.str.1) #5
  call void @abort() #6
  unreachable

264:                                              ; preds = %241
  br label %265

265:                                              ; preds = %264
  br label %266

266:                                              ; preds = %265
  %267 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret ptr %267
}

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


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

@sb_error_log = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [33 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: noreturn nounwind
declare void @abort() local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fma.f64(double, double, double) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @sb_vec_is_finite(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @sb_vec_rvsw(ptr noalias noundef returned %0, ptr noalias noundef readonly %1, ptr noalias noundef readonly %2) local_unnamed_addr #3 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %13

4:                                                ; preds = %3
  %5 = load ptr, ptr @sb_error_log, align 8
  %.not31 = icmp eq ptr %5, null
  %6 = load ptr, ptr @stderr, align 8
  %7 = select i1 %.not31, ptr %6, ptr %5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str.92) #5
  %9 = load ptr, ptr @sb_error_log, align 8
  %.not32 = icmp eq ptr %9, null
  %10 = load ptr, ptr @stderr, align 8
  %11 = select i1 %.not32, ptr %10, ptr %9
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

13:                                               ; preds = %3
  %.not33 = icmp eq ptr %1, null
  br i1 %.not33, label %14, label %23

14:                                               ; preds = %13
  %15 = load ptr, ptr @sb_error_log, align 8
  %.not34 = icmp eq ptr %15, null
  %16 = load ptr, ptr @stderr, align 8
  %17 = select i1 %.not34, ptr %16, ptr %15
  %18 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.93) #5
  %19 = load ptr, ptr @sb_error_log, align 8
  %.not35 = icmp eq ptr %19, null
  %20 = load ptr, ptr @stderr, align 8
  %21 = select i1 %.not35, ptr %20, ptr %19
  %22 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

23:                                               ; preds = %13
  %.not36 = icmp eq ptr %2, null
  br i1 %.not36, label %24, label %33

24:                                               ; preds = %23
  %25 = load ptr, ptr @sb_error_log, align 8
  %.not37 = icmp eq ptr %25, null
  %26 = load ptr, ptr @stderr, align 8
  %27 = select i1 %.not37, ptr %26, ptr %25
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.94) #5
  %29 = load ptr, ptr @sb_error_log, align 8
  %.not38 = icmp eq ptr %29, null
  %30 = load ptr, ptr @stderr, align 8
  %31 = select i1 %.not38, ptr %30, ptr %29
  %32 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

33:                                               ; preds = %23
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = load i8, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %1, i64 16
  %37 = load i8, ptr %36, align 8, !tbaa !5
  %.not39 = icmp eq i8 %35, %37
  br i1 %.not39, label %47, label %38

38:                                               ; preds = %33
  %39 = load ptr, ptr @sb_error_log, align 8
  %.not52 = icmp eq ptr %39, null
  %40 = load ptr, ptr @stderr, align 8
  %41 = select i1 %.not52, ptr %40, ptr %39
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.95) #5
  %43 = load ptr, ptr @sb_error_log, align 8
  %.not53 = icmp eq ptr %43, null
  %44 = load ptr, ptr @stderr, align 8
  %45 = select i1 %.not53, ptr %44, ptr %43
  %46 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

47:                                               ; preds = %33
  %48 = getelementptr inbounds i8, ptr %2, i64 16
  %49 = load i8, ptr %48, align 8, !tbaa !5
  %.not40 = icmp eq i8 %35, %49
  br i1 %.not40, label %59, label %50

50:                                               ; preds = %47
  %51 = load ptr, ptr @sb_error_log, align 8
  %.not50 = icmp eq ptr %51, null
  %52 = load ptr, ptr @stderr, align 8
  %53 = select i1 %.not50, ptr %52, ptr %51
  %54 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.96) #5
  %55 = load ptr, ptr @sb_error_log, align 8
  %.not51 = icmp eq ptr %55, null
  %56 = load ptr, ptr @stderr, align 8
  %57 = select i1 %.not51, ptr %56, ptr %55
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

59:                                               ; preds = %47
  %60 = load i64, ptr %0, align 8, !tbaa !11
  %61 = load i64, ptr %1, align 8, !tbaa !11
  %.not41 = icmp eq i64 %60, %61
  br i1 %.not41, label %71, label %62

62:                                               ; preds = %59
  %63 = load ptr, ptr @sb_error_log, align 8
  %.not48 = icmp eq ptr %63, null
  %64 = load ptr, ptr @stderr, align 8
  %65 = select i1 %.not48, ptr %64, ptr %63
  %66 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str.97) #5
  %67 = load ptr, ptr @sb_error_log, align 8
  %.not49 = icmp eq ptr %67, null
  %68 = load ptr, ptr @stderr, align 8
  %69 = select i1 %.not49, ptr %68, ptr %67
  %70 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

71:                                               ; preds = %59
  %72 = load i64, ptr %2, align 8, !tbaa !11
  %.not42 = icmp eq i64 %60, %72
  br i1 %.not42, label %82, label %73

73:                                               ; preds = %71
  %74 = load ptr, ptr @sb_error_log, align 8
  %.not46 = icmp eq ptr %74, null
  %75 = load ptr, ptr @stderr, align 8
  %76 = select i1 %.not46, ptr %75, ptr %74
  %77 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef nonnull @.str.98) #5
  %78 = load ptr, ptr @sb_error_log, align 8
  %.not47 = icmp eq ptr %78, null
  %79 = load ptr, ptr @stderr, align 8
  %80 = select i1 %.not47, ptr %79, ptr %78
  %81 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

82:                                               ; preds = %71
  %83 = getelementptr inbounds i8, ptr %0, i64 8
  %84 = load ptr, ptr %83, align 8, !tbaa !12
  %85 = getelementptr inbounds i8, ptr %1, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !12
  %87 = getelementptr inbounds i8, ptr %2, i64 8
  %88 = load ptr, ptr %87, align 8, !tbaa !12
  %.not55 = icmp eq i64 %60, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %82
  %min.iters.check = icmp ult i64 %60, 6
  br i1 %min.iters.check, label %.lr.ph.preheader63, label %vector.memcheck

.lr.ph.preheader63:                               ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %.054.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %.neg = or disjoint i64 %.054.ph, 1
  %xtraiter = and i64 %60, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader63
  %89 = getelementptr inbounds double, ptr %84, i64 %.054.ph
  %90 = load double, ptr %89, align 8, !tbaa !13
  %91 = getelementptr inbounds double, ptr %86, i64 %.054.ph
  %92 = load double, ptr %91, align 8, !tbaa !13
  %93 = getelementptr inbounds double, ptr %88, i64 %.054.ph
  %94 = load double, ptr %93, align 8, !tbaa !13
  %95 = fneg double %94
  %96 = tail call double @llvm.fma.f64(double %90, double %92, double %95)
  store double %96, ptr %89, align 8, !tbaa !13
  %97 = or disjoint i64 %.054.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader63
  %.054.unr = phi i64 [ %.054.ph, %.lr.ph.preheader63 ], [ %97, %.lr.ph.prol ]
  %98 = icmp eq i64 %60, %.neg
  br i1 %98, label %._crit_edge, label %.lr.ph

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %99 = shl i64 %60, 3
  %scevgep = getelementptr i8, ptr %84, i64 %99
  %scevgep56 = getelementptr i8, ptr %86, i64 %99
  %scevgep57 = getelementptr i8, ptr %88, i64 %99
  %bound0 = icmp ult ptr %84, %scevgep56
  %bound1 = icmp ult ptr %86, %scevgep
  %found.conflict = and i1 %bound0, %bound1
  %bound058 = icmp ult ptr %84, %scevgep57
  %bound159 = icmp ult ptr %88, %scevgep
  %found.conflict60 = and i1 %bound058, %bound159
  %conflict.rdx = or i1 %found.conflict, %found.conflict60
  br i1 %conflict.rdx, label %.lr.ph.preheader63, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %60, -2
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %100 = getelementptr inbounds double, ptr %84, i64 %index
  %wide.load = load <2 x double>, ptr %100, align 8, !tbaa !13, !alias.scope !15, !noalias !18
  %101 = getelementptr inbounds double, ptr %86, i64 %index
  %wide.load61 = load <2 x double>, ptr %101, align 8, !tbaa !13, !alias.scope !21
  %102 = getelementptr inbounds double, ptr %88, i64 %index
  %wide.load62 = load <2 x double>, ptr %102, align 8, !tbaa !13, !alias.scope !22
  %103 = fneg <2 x double> %wide.load62
  %104 = tail call <2 x double> @llvm.fma.v2f64(<2 x double> %wide.load, <2 x double> %wide.load61, <2 x double> %103)
  store <2 x double> %104, ptr %100, align 8, !tbaa !13, !alias.scope !15, !noalias !18
  %index.next = add nuw i64 %index, 2
  %105 = icmp eq i64 %index.next, %n.vec
  br i1 %105, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %60, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader63

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %82
  %106 = tail call i32 @sb_vec_is_finite(ptr noundef nonnull %0)
  %.not43 = icmp eq i32 %106, 0
  br i1 %.not43, label %125, label %134

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.054 = phi i64 [ %124, %.lr.ph ], [ %.054.unr, %.lr.ph.prol.loopexit ]
  %107 = getelementptr inbounds double, ptr %84, i64 %.054
  %108 = load double, ptr %107, align 8, !tbaa !13
  %109 = getelementptr inbounds double, ptr %86, i64 %.054
  %110 = load double, ptr %109, align 8, !tbaa !13
  %111 = getelementptr inbounds double, ptr %88, i64 %.054
  %112 = load double, ptr %111, align 8, !tbaa !13
  %113 = fneg double %112
  %114 = tail call double @llvm.fma.f64(double %108, double %110, double %113)
  store double %114, ptr %107, align 8, !tbaa !13
  %115 = add nuw i64 %.054, 1
  %116 = getelementptr inbounds double, ptr %84, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !13
  %118 = getelementptr inbounds double, ptr %86, i64 %115
  %119 = load double, ptr %118, align 8, !tbaa !13
  %120 = getelementptr inbounds double, ptr %88, i64 %115
  %121 = load double, ptr %120, align 8, !tbaa !13
  %122 = fneg double %121
  %123 = tail call double @llvm.fma.f64(double %117, double %119, double %122)
  store double %123, ptr %116, align 8, !tbaa !13
  %124 = add nuw i64 %.054, 2
  %exitcond.not.1 = icmp eq i64 %124, %60
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph, !llvm.loop !27

125:                                              ; preds = %._crit_edge
  %126 = load ptr, ptr @sb_error_log, align 8
  %.not44 = icmp eq ptr %126, null
  %127 = load ptr, ptr @stderr, align 8
  %128 = select i1 %.not44, ptr %127, ptr %126
  %129 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef nonnull @.str.99) #5
  %130 = load ptr, ptr @sb_error_log, align 8
  %.not45 = icmp eq ptr %130, null
  %131 = load ptr, ptr @stderr, align 8
  %132 = select i1 %.not45, ptr %131, ptr %130
  %133 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef nonnull @.str.1) #5
  tail call void @abort() #6
  unreachable

134:                                              ; preds = %._crit_edge
  ret ptr %0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fma.v2f64(<2 x double>, <2 x double>, <2 x double>) #4

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 = { 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !8, i64 16}
!6 = !{!"", !7, i64 0, !10, i64 8, !8, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!16}
!16 = distinct !{!16, !17}
!17 = distinct !{!17, !"LVerDomain"}
!18 = !{!19, !20}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = !{!19}
!22 = !{!20}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24, !25}


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