; LLVM IR from tangjz/acm-icpc :: codeforces/gym/101064A.ll (Z5solvev)

; 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

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

23:                                               ; preds = %37, %0
  %24 = load i32, ptr %3, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 5
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %40

27:                                               ; preds = %23
  %28 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 0
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds double, ptr %28, i64 %30
  %32 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 0
  %33 = load i32, ptr %3, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds double, ptr %32, i64 %34
  %36 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %31, ptr noundef %35)
  br label %37

37:                                               ; preds = %27
  %38 = load i32, ptr %3, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %3, align 4, !tbaa !5
  br label %23, !llvm.loop !9

40:                                               ; preds = %26
  %41 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 0
  %42 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 0
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %42) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %43 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 2
  %44 = load double, ptr %43, align 16, !tbaa !11
  %45 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 1
  %46 = load double, ptr %45, align 8, !tbaa !11
  %47 = fsub double %44, %46
  %48 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 0
  %49 = load double, ptr %48, align 16, !tbaa !11
  %50 = fdiv double %47, %49
  %51 = fsub double %50, 1.000000e+00
  store double %51, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %52 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 4
  %53 = load double, ptr %52, align 16, !tbaa !11
  %54 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 1
  %55 = load double, ptr %54, align 8, !tbaa !11
  %56 = fsub double %53, %55
  %57 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 0
  %58 = load double, ptr %57, align 16, !tbaa !11
  %59 = fdiv double %56, %58
  store double %59, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %60 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 1
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = fneg double %61
  store double %62, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %63 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 2
  %64 = load double, ptr %63, align 16, !tbaa !11
  %65 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 1
  %66 = load double, ptr %65, align 8, !tbaa !11
  %67 = fsub double %64, %66
  %68 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 0
  %69 = load double, ptr %68, align 16, !tbaa !11
  %70 = fdiv double %67, %69
  store double %70, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %71 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 4
  %72 = load double, ptr %71, align 16, !tbaa !11
  %73 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 1
  %74 = load double, ptr %73, align 8, !tbaa !11
  %75 = fsub double %72, %74
  %76 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 0
  %77 = load double, ptr %76, align 16, !tbaa !11
  %78 = fdiv double %75, %77
  %79 = fsub double %78, 1.000000e+00
  store double %79, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %80 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 1
  %81 = load double, ptr %80, align 8, !tbaa !11
  %82 = fneg double %81
  store double %82, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %83 = load double, ptr %4, align 8, !tbaa !11
  %84 = load double, ptr %8, align 8, !tbaa !11
  %85 = load double, ptr %5, align 8, !tbaa !11
  %86 = load double, ptr %7, align 8, !tbaa !11
  %87 = fmul double %85, %86
  %88 = fneg double %87
  %89 = call double @llvm.fmuladd.f64(double %83, double %84, double %88)
  store double %89, ptr %10, align 8, !tbaa !11
  %90 = load double, ptr %10, align 8, !tbaa !11
  %91 = call noundef i32 @_Z3sgnd(double noundef %90)
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %115

93:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %94 = load double, ptr %8, align 8, !tbaa !11
  %95 = load double, ptr %6, align 8, !tbaa !11
  %96 = load double, ptr %5, align 8, !tbaa !11
  %97 = load double, ptr %9, align 8, !tbaa !11
  %98 = fmul double %96, %97
  %99 = fneg double %98
  %100 = call double @llvm.fmuladd.f64(double %94, double %95, double %99)
  %101 = load double, ptr %10, align 8, !tbaa !11
  %102 = fdiv double %100, %101
  store double %102, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %103 = load double, ptr %4, align 8, !tbaa !11
  %104 = load double, ptr %9, align 8, !tbaa !11
  %105 = load double, ptr %7, align 8, !tbaa !11
  %106 = load double, ptr %6, align 8, !tbaa !11
  %107 = fmul double %105, %106
  %108 = fneg double %107
  %109 = call double @llvm.fmuladd.f64(double %103, double %104, double %108)
  %110 = load double, ptr %10, align 8, !tbaa !11
  %111 = fdiv double %109, %110
  store double %111, ptr %12, align 8, !tbaa !11
  %112 = load double, ptr %11, align 8, !tbaa !11
  %113 = load double, ptr %12, align 8, !tbaa !11
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %112, double noundef %113)
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %237

115:                                              ; preds = %40
  %116 = load double, ptr %4, align 8, !tbaa !11
  %117 = call noundef i32 @_Z3sgnd(double noundef %116)
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %125, label %119

119:                                              ; preds = %115
  %120 = load double, ptr %5, align 8, !tbaa !11
  %121 = call noundef i32 @_Z3sgnd(double noundef %120)
  %122 = icmp ne i32 %121, 0
  br i1 %122, label %125, label %123

123:                                              ; preds = %119
  %124 = call i32 @puts(ptr noundef @.str.2)
  store i32 1, ptr %13, align 4
  br label %237

125:                                              ; preds = %119, %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 1, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 4, ptr %15, align 4, !tbaa !5
  br label %126

126:                                              ; preds = %230, %125
  %127 = load i32, ptr %14, align 4, !tbaa !5
  %128 = icmp slt i32 %127, 5
  br i1 %128, label %130, label %129

129:                                              ; preds = %126
  store i32 5, ptr %13, align 4
  br label %233

130:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %131 = load i32, ptr %14, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !11
  %135 = load i32, ptr %15, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 %136
  %138 = load double, ptr %137, align 8, !tbaa !11
  %139 = fsub double %134, %138
  store double %139, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %140 = load i32, ptr %15, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 %141
  %143 = load double, ptr %142, align 8, !tbaa !11
  %144 = load i32, ptr %14, align 4, !tbaa !5
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !11
  %148 = fsub double %143, %147
  store double %148, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %149 = load double, ptr %16, align 8, !tbaa !11
  %150 = load i32, ptr %15, align 4, !tbaa !5
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !11
  %154 = load double, ptr %17, align 8, !tbaa !11
  %155 = load i32, ptr %15, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !11
  %159 = fmul double %154, %158
  %160 = call double @llvm.fmuladd.f64(double %149, double %153, double %159)
  store double %160, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %161 = load double, ptr %4, align 8, !tbaa !11
  %162 = load double, ptr %17, align 8, !tbaa !11
  %163 = load double, ptr %5, align 8, !tbaa !11
  %164 = load double, ptr %16, align 8, !tbaa !11
  %165 = fmul double %163, %164
  %166 = fneg double %165
  %167 = call double @llvm.fmuladd.f64(double %161, double %162, double %166)
  store double %167, ptr %19, align 8, !tbaa !11
  %168 = load double, ptr %19, align 8, !tbaa !11
  %169 = call noundef i32 @_Z3sgnd(double noundef %168)
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %172, label %171

171:                                              ; preds = %130
  store i32 7, ptr %13, align 4
  br label %228

172:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %173 = load double, ptr %17, align 8, !tbaa !11
  %174 = load double, ptr %6, align 8, !tbaa !11
  %175 = load double, ptr %5, align 8, !tbaa !11
  %176 = load double, ptr %18, align 8, !tbaa !11
  %177 = fmul double %175, %176
  %178 = fneg double %177
  %179 = call double @llvm.fmuladd.f64(double %173, double %174, double %178)
  %180 = load double, ptr %19, align 8, !tbaa !11
  %181 = fdiv double %179, %180
  store double %181, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %182 = load double, ptr %4, align 8, !tbaa !11
  %183 = load double, ptr %18, align 8, !tbaa !11
  %184 = load double, ptr %16, align 8, !tbaa !11
  %185 = load double, ptr %6, align 8, !tbaa !11
  %186 = fmul double %184, %185
  %187 = fneg double %186
  %188 = call double @llvm.fmuladd.f64(double %182, double %183, double %187)
  %189 = load double, ptr %19, align 8, !tbaa !11
  %190 = fdiv double %188, %189
  store double %190, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %191 = load double, ptr %16, align 8, !tbaa !11
  %192 = call noundef i32 @_Z3sgnd(double noundef %191)
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %203

194:                                              ; preds = %172
  %195 = load double, ptr %21, align 8, !tbaa !11
  %196 = load i32, ptr %15, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [5 x double], ptr %2, i64 0, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !11
  %200 = fsub double %195, %199
  %201 = load double, ptr %16, align 8, !tbaa !11
  %202 = fdiv double %200, %201
  br label %212

203:                                              ; preds = %172
  %204 = load i32, ptr %15, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [5 x double], ptr %1, i64 0, i64 %205
  %207 = load double, ptr %206, align 8, !tbaa !11
  %208 = load double, ptr %20, align 8, !tbaa !11
  %209 = fsub double %207, %208
  %210 = load double, ptr %17, align 8, !tbaa !11
  %211 = fdiv double %209, %210
  br label %212

212:                                              ; preds = %203, %194
  %213 = phi double [ %202, %194 ], [ %211, %203 ]
  store double %213, ptr %22, align 8, !tbaa !11
  %214 = load double, ptr %22, align 8, !tbaa !11
  %215 = call noundef i32 @_Z3sgnd(double noundef %214)
  %216 = icmp slt i32 %215, 0
  br i1 %216, label %222, label %217

217:                                              ; preds = %212
  %218 = load double, ptr %22, align 8, !tbaa !11
  %219 = fsub double %218, 1.000000e+00
  %220 = call noundef i32 @_Z3sgnd(double noundef %219)
  %221 = icmp sgt i32 %220, 0
  br i1 %221, label %222, label %223

222:                                              ; preds = %217, %212
  store i32 7, ptr %13, align 4
  br label %227

223:                                              ; preds = %217
  %224 = load double, ptr %20, align 8, !tbaa !11
  %225 = load double, ptr %21, align 8, !tbaa !11
  %226 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, double noundef %224, double noundef %225)
  store i32 1, ptr %13, align 4
  br label %227

227:                                              ; preds = %223, %222
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %228

228:                                              ; preds = %227, %171
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %229 = load i32, ptr %13, align 4
  switch i32 %229, label %233 [
    i32 7, label %230
  ]

230:                                              ; preds = %228
  %231 = load i32, ptr %14, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %14, align 4, !tbaa !5
  store i32 %231, ptr %15, align 4, !tbaa !5
  br label %126, !llvm.loop !13

233:                                              ; preds = %228, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %234 = load i32, ptr %13, align 4
  switch i32 %234, label %237 [
    i32 5, label %235
  ]

235:                                              ; preds = %233
  %236 = call i32 @puts(ptr noundef @.str.3)
  store i32 0, ptr %13, align 4
  br label %237

237:                                              ; preds = %235, %233, %123, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #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
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %1) #5
  %238 = load i32, ptr %13, align 4
  switch i32 %238, label %240 [
    i32 0, label %239
    i32 1, label %239
  ]

239:                                              ; preds = %237, %237
  ret void

240:                                              ; preds = %237
  unreachable
}

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

declare i32 @__isoc99_scanf(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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgnd(double noundef) #3

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

declare i32 @puts(ptr noundef) #2

attributes #0 = { 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 #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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !10}


; 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 [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #0 {
  %1 = alloca [5 x double], align 16
  %2 = alloca [5 x double], align 16
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #6
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %4 = getelementptr inbounds i8, ptr %1, i64 8
  %5 = getelementptr inbounds i8, ptr %2, i64 8
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4, ptr noundef nonnull %5)
  %7 = getelementptr inbounds i8, ptr %1, i64 16
  %8 = getelementptr inbounds i8, ptr %2, i64 16
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %10 = getelementptr inbounds i8, ptr %1, i64 24
  %11 = getelementptr inbounds i8, ptr %2, i64 24
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %10, ptr noundef nonnull %11)
  %13 = getelementptr inbounds i8, ptr %1, i64 32
  %14 = getelementptr inbounds i8, ptr %2, i64 32
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %13, ptr noundef nonnull %14)
  call void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %16 = load double, ptr %7, align 16, !tbaa !5
  %17 = load double, ptr %4, align 8, !tbaa !5
  %18 = fsub double %16, %17
  %19 = load double, ptr %1, align 16, !tbaa !5
  %20 = fdiv double %18, %19
  %21 = fadd double %20, -1.000000e+00
  %22 = load double, ptr %13, align 16, !tbaa !5
  %23 = fsub double %22, %17
  %24 = load double, ptr %2, align 16, !tbaa !5
  %25 = fdiv double %23, %24
  %26 = fneg double %17
  %27 = load double, ptr %8, align 16, !tbaa !5
  %28 = load double, ptr %5, align 8, !tbaa !5
  %29 = fsub double %27, %28
  %30 = fdiv double %29, %19
  %31 = load double, ptr %14, align 16, !tbaa !5
  %32 = fsub double %31, %28
  %33 = fdiv double %32, %24
  %34 = fadd double %33, -1.000000e+00
  %35 = fneg double %25
  %36 = fmul double %30, %35
  %37 = call double @llvm.fmuladd.f64(double %21, double %34, double %36)
  %38 = call noundef i32 @_Z3sgnd(double noundef %37)
  %.not = icmp eq i32 %38, 0
  br i1 %.not, label %48, label %39

39:                                               ; preds = %0
  %40 = fneg double %28
  %41 = fmul double %25, %28
  %42 = call double @llvm.fmuladd.f64(double %34, double %26, double %41)
  %43 = fdiv double %42, %37
  %44 = fmul double %17, %30
  %45 = call double @llvm.fmuladd.f64(double %21, double %40, double %44)
  %46 = fdiv double %45, %37
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %43, double noundef %46)
  br label %240

48:                                               ; preds = %0
  %49 = call noundef i32 @_Z3sgnd(double noundef %21)
  %.not64 = icmp eq i32 %49, 0
  br i1 %.not64, label %50, label %54

50:                                               ; preds = %48
  %51 = call noundef i32 @_Z3sgnd(double noundef %25)
  %.not65 = icmp eq i32 %51, 0
  br i1 %.not65, label %52, label %54

52:                                               ; preds = %50
  %53 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %240

54:                                               ; preds = %50, %48
  %55 = load double, ptr %5, align 8, !tbaa !5
  %56 = load double, ptr %14, align 16, !tbaa !5
  %57 = fsub double %55, %56
  %58 = load double, ptr %13, align 16, !tbaa !5
  %59 = load double, ptr %4, align 8, !tbaa !5
  %60 = fsub double %58, %59
  %61 = fmul double %57, %35
  %62 = call double @llvm.fmuladd.f64(double %21, double %60, double %61)
  %63 = call noundef i32 @_Z3sgnd(double noundef %62)
  %.not66 = icmp eq i32 %63, 0
  br i1 %.not66, label %99, label %64

64:                                               ; preds = %54
  %65 = fmul double %56, %60
  %66 = call double @llvm.fmuladd.f64(double %57, double %58, double %65)
  %67 = insertelement <2 x double> poison, double %66, i64 0
  %68 = insertelement <2 x double> %67, double %17, i64 1
  %69 = insertelement <2 x double> poison, double %35, i64 0
  %70 = insertelement <2 x double> %69, double %57, i64 1
  %71 = fmul <2 x double> %68, %70
  %72 = insertelement <2 x double> poison, double %60, i64 0
  %73 = insertelement <2 x double> %72, double %21, i64 1
  %74 = insertelement <2 x double> poison, double %26, i64 0
  %75 = insertelement <2 x double> %74, double %66, i64 1
  %76 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %73, <2 x double> %75, <2 x double> %71)
  %77 = insertelement <2 x double> poison, double %62, i64 0
  %78 = shufflevector <2 x double> %77, <2 x double> poison, <2 x i32> zeroinitializer
  %79 = fdiv <2 x double> %76, %78
  %80 = call noundef i32 @_Z3sgnd(double noundef %57)
  %.not67 = icmp eq i32 %80, 0
  br i1 %.not67, label %86, label %81

81:                                               ; preds = %64
  %82 = load double, ptr %14, align 16, !tbaa !5
  %83 = extractelement <2 x double> %79, i64 1
  %84 = fsub double %83, %82
  %85 = fdiv double %84, %57
  br label %91

86:                                               ; preds = %64
  %87 = load double, ptr %13, align 16, !tbaa !5
  %88 = extractelement <2 x double> %79, i64 0
  %89 = fsub double %87, %88
  %90 = fdiv double %89, %60
  br label %91

91:                                               ; preds = %86, %81
  %92 = phi double [ %85, %81 ], [ %90, %86 ]
  %93 = call noundef i32 @_Z3sgnd(double noundef %92)
  %94 = icmp slt i32 %93, 0
  br i1 %94, label %99, label %95

95:                                               ; preds = %91
  %96 = fadd double %92, -1.000000e+00
  %97 = call noundef i32 @_Z3sgnd(double noundef %96)
  %98 = icmp sgt i32 %97, 0
  br i1 %98, label %99, label %235

99:                                               ; preds = %54, %95, %91
  %100 = load double, ptr %8, align 16, !tbaa !5
  %101 = load double, ptr %5, align 8, !tbaa !5
  %102 = fsub double %100, %101
  %103 = load double, ptr %4, align 8, !tbaa !5
  %104 = load double, ptr %7, align 16, !tbaa !5
  %105 = fsub double %103, %104
  %106 = fmul double %102, %35
  %107 = call double @llvm.fmuladd.f64(double %21, double %105, double %106)
  %108 = call noundef i32 @_Z3sgnd(double noundef %107)
  %.not66.1 = icmp eq i32 %108, 0
  br i1 %.not66.1, label %144, label %109

109:                                              ; preds = %99
  %110 = fmul double %101, %105
  %111 = call double @llvm.fmuladd.f64(double %102, double %103, double %110)
  %112 = insertelement <2 x double> poison, double %111, i64 0
  %113 = insertelement <2 x double> %112, double %17, i64 1
  %114 = insertelement <2 x double> poison, double %35, i64 0
  %115 = insertelement <2 x double> %114, double %102, i64 1
  %116 = fmul <2 x double> %113, %115
  %117 = insertelement <2 x double> poison, double %105, i64 0
  %118 = insertelement <2 x double> %117, double %21, i64 1
  %119 = insertelement <2 x double> poison, double %26, i64 0
  %120 = insertelement <2 x double> %119, double %111, i64 1
  %121 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %118, <2 x double> %120, <2 x double> %116)
  %122 = insertelement <2 x double> poison, double %107, i64 0
  %123 = shufflevector <2 x double> %122, <2 x double> poison, <2 x i32> zeroinitializer
  %124 = fdiv <2 x double> %121, %123
  %125 = call noundef i32 @_Z3sgnd(double noundef %102)
  %.not67.1 = icmp eq i32 %125, 0
  br i1 %.not67.1, label %131, label %126

126:                                              ; preds = %109
  %127 = load double, ptr %5, align 8, !tbaa !5
  %128 = extractelement <2 x double> %124, i64 1
  %129 = fsub double %128, %127
  %130 = fdiv double %129, %102
  br label %136

131:                                              ; preds = %109
  %132 = load double, ptr %4, align 8, !tbaa !5
  %133 = extractelement <2 x double> %124, i64 0
  %134 = fsub double %132, %133
  %135 = fdiv double %134, %105
  br label %136

136:                                              ; preds = %131, %126
  %137 = phi double [ %130, %126 ], [ %135, %131 ]
  %138 = call noundef i32 @_Z3sgnd(double noundef %137)
  %139 = icmp slt i32 %138, 0
  br i1 %139, label %144, label %140

140:                                              ; preds = %136
  %141 = fadd double %137, -1.000000e+00
  %142 = call noundef i32 @_Z3sgnd(double noundef %141)
  %143 = icmp sgt i32 %142, 0
  br i1 %143, label %144, label %235

144:                                              ; preds = %140, %136, %99
  %145 = load double, ptr %11, align 8, !tbaa !5
  %146 = load double, ptr %8, align 16, !tbaa !5
  %147 = fsub double %145, %146
  %148 = load double, ptr %7, align 16, !tbaa !5
  %149 = load double, ptr %10, align 8, !tbaa !5
  %150 = fsub double %148, %149
  %151 = fmul double %147, %35
  %152 = call double @llvm.fmuladd.f64(double %21, double %150, double %151)
  %153 = call noundef i32 @_Z3sgnd(double noundef %152)
  %.not66.2 = icmp eq i32 %153, 0
  br i1 %.not66.2, label %189, label %154

154:                                              ; preds = %144
  %155 = fmul double %146, %150
  %156 = call double @llvm.fmuladd.f64(double %147, double %148, double %155)
  %157 = insertelement <2 x double> poison, double %156, i64 0
  %158 = insertelement <2 x double> %157, double %17, i64 1
  %159 = insertelement <2 x double> poison, double %35, i64 0
  %160 = insertelement <2 x double> %159, double %147, i64 1
  %161 = fmul <2 x double> %158, %160
  %162 = insertelement <2 x double> poison, double %150, i64 0
  %163 = insertelement <2 x double> %162, double %21, i64 1
  %164 = insertelement <2 x double> poison, double %26, i64 0
  %165 = insertelement <2 x double> %164, double %156, i64 1
  %166 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %163, <2 x double> %165, <2 x double> %161)
  %167 = insertelement <2 x double> poison, double %152, i64 0
  %168 = shufflevector <2 x double> %167, <2 x double> poison, <2 x i32> zeroinitializer
  %169 = fdiv <2 x double> %166, %168
  %170 = call noundef i32 @_Z3sgnd(double noundef %147)
  %.not67.2 = icmp eq i32 %170, 0
  br i1 %.not67.2, label %176, label %171

171:                                              ; preds = %154
  %172 = load double, ptr %8, align 16, !tbaa !5
  %173 = extractelement <2 x double> %169, i64 1
  %174 = fsub double %173, %172
  %175 = fdiv double %174, %147
  br label %181

176:                                              ; preds = %154
  %177 = load double, ptr %7, align 16, !tbaa !5
  %178 = extractelement <2 x double> %169, i64 0
  %179 = fsub double %177, %178
  %180 = fdiv double %179, %150
  br label %181

181:                                              ; preds = %176, %171
  %182 = phi double [ %175, %171 ], [ %180, %176 ]
  %183 = call noundef i32 @_Z3sgnd(double noundef %182)
  %184 = icmp slt i32 %183, 0
  br i1 %184, label %189, label %185

185:                                              ; preds = %181
  %186 = fadd double %182, -1.000000e+00
  %187 = call noundef i32 @_Z3sgnd(double noundef %186)
  %188 = icmp sgt i32 %187, 0
  br i1 %188, label %189, label %235

189:                                              ; preds = %185, %181, %144
  %190 = load double, ptr %14, align 16, !tbaa !5
  %191 = load double, ptr %11, align 8, !tbaa !5
  %192 = fsub double %190, %191
  %193 = load double, ptr %10, align 8, !tbaa !5
  %194 = load double, ptr %13, align 16, !tbaa !5
  %195 = fsub double %193, %194
  %196 = fmul double %192, %35
  %197 = call double @llvm.fmuladd.f64(double %21, double %195, double %196)
  %198 = call noundef i32 @_Z3sgnd(double noundef %197)
  %.not66.3 = icmp eq i32 %198, 0
  br i1 %.not66.3, label %.critedge, label %199

199:                                              ; preds = %189
  %200 = fmul double %191, %195
  %201 = call double @llvm.fmuladd.f64(double %192, double %193, double %200)
  %202 = insertelement <2 x double> poison, double %201, i64 0
  %203 = insertelement <2 x double> %202, double %17, i64 1
  %204 = insertelement <2 x double> poison, double %35, i64 0
  %205 = insertelement <2 x double> %204, double %192, i64 1
  %206 = fmul <2 x double> %203, %205
  %207 = insertelement <2 x double> poison, double %195, i64 0
  %208 = insertelement <2 x double> %207, double %21, i64 1
  %209 = insertelement <2 x double> poison, double %26, i64 0
  %210 = insertelement <2 x double> %209, double %201, i64 1
  %211 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %208, <2 x double> %210, <2 x double> %206)
  %212 = insertelement <2 x double> poison, double %197, i64 0
  %213 = shufflevector <2 x double> %212, <2 x double> poison, <2 x i32> zeroinitializer
  %214 = fdiv <2 x double> %211, %213
  %215 = call noundef i32 @_Z3sgnd(double noundef %192)
  %.not67.3 = icmp eq i32 %215, 0
  br i1 %.not67.3, label %221, label %216

216:                                              ; preds = %199
  %217 = load double, ptr %11, align 8, !tbaa !5
  %218 = extractelement <2 x double> %214, i64 1
  %219 = fsub double %218, %217
  %220 = fdiv double %219, %192
  br label %226

221:                                              ; preds = %199
  %222 = load double, ptr %10, align 8, !tbaa !5
  %223 = extractelement <2 x double> %214, i64 0
  %224 = fsub double %222, %223
  %225 = fdiv double %224, %195
  br label %226

226:                                              ; preds = %221, %216
  %227 = phi double [ %220, %216 ], [ %225, %221 ]
  %228 = call noundef i32 @_Z3sgnd(double noundef %227)
  %229 = icmp slt i32 %228, 0
  br i1 %229, label %.critedge, label %230

230:                                              ; preds = %226
  %231 = fadd double %227, -1.000000e+00
  %232 = call noundef i32 @_Z3sgnd(double noundef %231)
  %233 = icmp sgt i32 %232, 0
  br i1 %233, label %.critedge, label %235

.critedge:                                        ; preds = %230, %226, %189
  %234 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %240

235:                                              ; preds = %230, %185, %140, %95
  %236 = phi <2 x double> [ %79, %95 ], [ %124, %140 ], [ %169, %185 ], [ %214, %230 ]
  %237 = extractelement <2 x double> %236, i64 0
  %238 = extractelement <2 x double> %236, i64 1
  %239 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %237, double noundef %238)
  br label %240

240:                                              ; preds = %235, %.critedge, %52, %39
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #6
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIdENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3sgnd(double noundef) local_unnamed_addr #3

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

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

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

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass