; LLVM IR from BrunoLevy/learn-fpga :: FemtoRV/FIRMWARE/EXAMPLES (imgui_tunnel)

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

; Function Attrs: nounwind uwtable
declare dso_local void @addQuad(<2 x float>, <2 x float>, <2 x float>, <2 x float>, i32 noundef) #0

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @vec2(float noundef, float noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @FX(<2 x float> %0, <2 x float> %1, <2 x float> %2, float noundef %3) #0 {
  %5 = alloca %struct.ImVec2, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca [2 x %struct.ImVec2], align 16
  %16 = alloca [2 x %struct.ImVec2], align 16
  %17 = alloca [4 x %struct.ImVec2], align 16
  %18 = alloca [8 x %struct.ImVec2], align 16
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %struct.ImVec2, align 4
  %22 = alloca %struct.ImVec2, align 4
  %23 = alloca %struct.ImVec2, align 4
  %24 = alloca %struct.ImVec2, align 4
  %25 = alloca [4 x %struct.ImVec2], align 16
  %26 = alloca float, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store <2 x float> %0, ptr %5, align 4
  store <2 x float> %1, ptr %6, align 4
  store <2 x float> %2, ptr %7, align 4
  store float %3, ptr %8, align 4, !tbaa !5
  %29 = load float, ptr %8, align 4, !tbaa !5
  %30 = fmul float %29, 4.000000e+00
  store float %30, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %253, %4
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = icmp slt i32 %32, 20
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %256

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = sitofp i32 %36 to double
  %38 = fsub double 2.100000e+01, %37
  %39 = load float, ptr %8, align 4, !tbaa !5
  %40 = load float, ptr %8, align 4, !tbaa !5
  %41 = call float @llvm.floor.f32(float %40)
  %42 = fsub float %39, %41
  %43 = fpext float %42 to double
  %44 = fneg double %43
  %45 = call double @llvm.fmuladd.f64(double %44, double 2.000000e+00, double %38)
  %46 = fptrunc double %45 to float
  store float %46, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %47 = load float, ptr %8, align 4, !tbaa !5
  %48 = fneg float %47
  %49 = fpext float %48 to double
  %50 = load float, ptr %10, align 4, !tbaa !5
  %51 = fpext float %50 to double
  %52 = call double @llvm.fmuladd.f64(double %49, double 2.100000e+00, double %51)
  %53 = fptrunc double %52 to float
  store float %53, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %54 = load float, ptr %8, align 4, !tbaa !5
  %55 = fneg float %54
  %56 = fpext float %55 to double
  %57 = load float, ptr %10, align 4, !tbaa !5
  %58 = fpext float %57 to double
  %59 = call double @llvm.fmuladd.f64(double %58, double 2.000000e-01, double %56)
  %60 = fptrunc double %59 to float
  store float %60, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %61 = load float, ptr %8, align 4, !tbaa !5
  %62 = fneg float %61
  %63 = fpext float %62 to double
  %64 = load float, ptr %10, align 4, !tbaa !5
  %65 = fpext float %64 to double
  %66 = fadd double %65, 1.000000e+00
  %67 = call double @llvm.fmuladd.f64(double %66, double 2.000000e-01, double %63)
  %68 = fptrunc double %67 to float
  store float %68, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store float 0x3FD3333340000000, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %69 = load float, ptr %8, align 4, !tbaa !5
  %70 = load float, ptr %10, align 4, !tbaa !5
  %71 = fadd float %69, %70
  %72 = fpext float %71 to double
  %73 = fmul double %72, 1.000000e-01
  %74 = fptrunc double %73 to float
  %75 = call float @cosf(float noundef %74) #6
  %76 = fpext float %75 to double
  %77 = call double @llvm.fmuladd.f64(double %76, double 2.000000e-01, double 1.000000e+00)
  %78 = fptrunc double %77 to float
  %79 = load float, ptr %8, align 4, !tbaa !5
  %80 = load float, ptr %10, align 4, !tbaa !5
  %81 = fadd float %79, %80
  %82 = fpext float %81 to double
  %83 = fmul double %82, 1.000000e-01
  %84 = fptrunc double %83 to float
  %85 = call float @sinf(float noundef %84) #6
  %86 = fpext float %85 to double
  %87 = call double @llvm.fmuladd.f64(double %86, double 2.000000e-01, double 1.000000e+00)
  %88 = fptrunc double %87 to float
  %89 = call <2 x float> @vec2(float noundef %78, float noundef %88)
  store <2 x float> %89, ptr %15, align 8
  %90 = getelementptr inbounds %struct.ImVec2, ptr %15, i64 1
  %91 = load float, ptr %8, align 4, !tbaa !5
  %92 = load float, ptr %10, align 4, !tbaa !5
  %93 = fadd float %91, %92
  %94 = fpext float %93 to double
  %95 = fadd double %94, 1.000000e+00
  %96 = fmul double %95, 1.000000e-01
  %97 = fptrunc double %96 to float
  %98 = call float @cosf(float noundef %97) #6
  %99 = fpext float %98 to double
  %100 = call double @llvm.fmuladd.f64(double %99, double 2.000000e-01, double 1.000000e+00)
  %101 = fptrunc double %100 to float
  %102 = load float, ptr %8, align 4, !tbaa !5
  %103 = load float, ptr %10, align 4, !tbaa !5
  %104 = fadd float %102, %103
  %105 = fpext float %104 to double
  %106 = fadd double %105, 1.000000e+00
  %107 = fmul double %106, 1.000000e-01
  %108 = fptrunc double %107 to float
  %109 = call float @sinf(float noundef %108) #6
  %110 = fpext float %109 to double
  %111 = call double @llvm.fmuladd.f64(double %110, double 2.000000e-01, double 1.000000e+00)
  %112 = fptrunc double %111 to float
  %113 = call <2 x float> @vec2(float noundef %101, float noundef %112)
  store <2 x float> %113, ptr %90, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %114 = load float, ptr %12, align 4, !tbaa !5
  %115 = call float @cosf(float noundef %114) #6
  %116 = load float, ptr %14, align 4, !tbaa !5
  %117 = fmul float %115, %116
  %118 = load float, ptr %12, align 4, !tbaa !5
  %119 = call float @sinf(float noundef %118) #6
  %120 = load float, ptr %14, align 4, !tbaa !5
  %121 = fmul float %119, %120
  %122 = call <2 x float> @vec2(float noundef %117, float noundef %121)
  store <2 x float> %122, ptr %16, align 8
  %123 = getelementptr inbounds %struct.ImVec2, ptr %16, i64 1
  %124 = load float, ptr %13, align 4, !tbaa !5
  %125 = call float @cosf(float noundef %124) #6
  %126 = load float, ptr %14, align 4, !tbaa !5
  %127 = fmul float %125, %126
  %128 = load float, ptr %13, align 4, !tbaa !5
  %129 = call float @sinf(float noundef %128) #6
  %130 = load float, ptr %14, align 4, !tbaa !5
  %131 = fmul float %129, %130
  %132 = call <2 x float> @vec2(float noundef %127, float noundef %131)
  store <2 x float> %132, ptr %123, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  %133 = call <2 x float> @vec2(float noundef -1.000000e+00, float noundef -1.000000e+00)
  store <2 x float> %133, ptr %17, align 8
  %134 = getelementptr inbounds %struct.ImVec2, ptr %17, i64 1
  %135 = call <2 x float> @vec2(float noundef 1.000000e+00, float noundef -1.000000e+00)
  store <2 x float> %135, ptr %134, align 8
  %136 = getelementptr inbounds %struct.ImVec2, ptr %17, i64 2
  %137 = call <2 x float> @vec2(float noundef 1.000000e+00, float noundef 1.000000e+00)
  store <2 x float> %137, ptr %136, align 8
  %138 = getelementptr inbounds %struct.ImVec2, ptr %17, i64 3
  %139 = call <2 x float> @vec2(float noundef -1.000000e+00, float noundef 1.000000e+00)
  store <2 x float> %139, ptr %138, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %18) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %182, %35
  %141 = load i32, ptr %19, align 4, !tbaa !9
  %142 = icmp slt i32 %141, 8
  br i1 %142, label %143, label %185

143:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %144 = load i32, ptr %19, align 4, !tbaa !9
  %145 = sdiv i32 %144, 4
  store i32 %145, ptr %20, align 4, !tbaa !9
  %146 = load i32, ptr %19, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [8 x %struct.ImVec2], ptr %18, i64 0, i64 %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %149 = load i32, ptr %19, align 4, !tbaa !9
  %150 = srem i32 %149, 4
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [4 x %struct.ImVec2], ptr %17, i64 0, i64 %151
  %153 = load i32, ptr %20, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [2 x %struct.ImVec2], ptr %15, i64 0, i64 %154
  %156 = load <2 x float>, ptr %152, align 8
  %157 = load <2 x float>, ptr %155, align 8
  %158 = call <2 x float> @vec2_mul(<2 x float> %156, <2 x float> %157)
  store <2 x float> %158, ptr %24, align 4
  %159 = load i32, ptr %20, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [2 x %struct.ImVec2], ptr %16, i64 0, i64 %160
  %162 = load <2 x float>, ptr %24, align 4
  %163 = load <2 x float>, ptr %161, align 8
  %164 = call <2 x float> @vec2_add(<2 x float> %162, <2 x float> %163)
  store <2 x float> %164, ptr %23, align 4
  %165 = load float, ptr %11, align 4, !tbaa !5
  %166 = load i32, ptr %20, align 4, !tbaa !9
  %167 = sitofp i32 %166 to float
  %168 = fadd float %165, %167
  %169 = load <2 x float>, ptr %23, align 4
  %170 = call <2 x float> @R(<2 x float> %169, float noundef %168)
  store <2 x float> %170, ptr %22, align 4
  %171 = load float, ptr %10, align 4, !tbaa !5
  %172 = load i32, ptr %20, align 4, !tbaa !9
  %173 = sitofp i32 %172 to float
  %174 = fadd float %171, %173
  %175 = fpext float %174 to double
  %176 = fmul double %175, 2.000000e+00
  %177 = fptrunc double %176 to float
  %178 = load <2 x float>, ptr %22, align 4
  %179 = load <2 x float>, ptr %7, align 4
  %180 = load <2 x float>, ptr %5, align 4
  %181 = call <2 x float> @conv(<2 x float> %178, float noundef %177, <2 x float> %179, <2 x float> %180)
  store <2 x float> %181, ptr %21, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %148, ptr align 4 %21, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %182

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

185:                                              ; preds = %140
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %186

186:                                              ; preds = %249, %185
  %187 = load i32, ptr %19, align 4, !tbaa !9
  %188 = icmp slt i32 %187, 4
  br i1 %188, label %189, label %252

189:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #6
  %190 = load i32, ptr %19, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [8 x %struct.ImVec2], ptr %18, i64 0, i64 %191
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %192, i64 8, i1 false), !tbaa.struct !11
  %193 = getelementptr inbounds %struct.ImVec2, ptr %25, i64 1
  %194 = load i32, ptr %19, align 4, !tbaa !9
  %195 = add nsw i32 %194, 1
  %196 = srem i32 %195, 4
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [8 x %struct.ImVec2], ptr %18, i64 0, i64 %197
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %193, ptr align 8 %198, i64 8, i1 false), !tbaa.struct !11
  %199 = getelementptr inbounds %struct.ImVec2, ptr %25, i64 2
  %200 = load i32, ptr %19, align 4, !tbaa !9
  %201 = add nsw i32 %200, 1
  %202 = srem i32 %201, 4
  %203 = add nsw i32 %202, 4
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [8 x %struct.ImVec2], ptr %18, i64 0, i64 %204
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %199, ptr align 8 %205, i64 8, i1 false), !tbaa.struct !11
  %206 = getelementptr inbounds %struct.ImVec2, ptr %25, i64 3
  %207 = load i32, ptr %19, align 4, !tbaa !9
  %208 = add nsw i32 %207, 4
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [8 x %struct.ImVec2], ptr %18, i64 0, i64 %209
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %206, ptr align 8 %210, i64 8, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %211 = load i32, ptr %9, align 4, !tbaa !9
  %212 = and i32 %211, 1
  %213 = icmp ne i32 %212, 0
  %214 = zext i1 %213 to i64
  %215 = select i1 %213, double 5.000000e-01, double 6.000000e-01
  %216 = load i32, ptr %19, align 4, !tbaa !9
  %217 = sitofp i32 %216 to double
  %218 = call double @llvm.fmuladd.f64(double %217, double 5.000000e-02, double %215)
  %219 = load float, ptr %10, align 4, !tbaa !5
  %220 = fpext float %219 to double
  %221 = fsub double 2.100000e+01, %220
  %222 = fdiv double %221, 2.100000e+01
  %223 = fmul double %218, %222
  %224 = fptrunc double %223 to float
  store float %224, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %225 = load float, ptr %26, align 4, !tbaa !5
  %226 = fpext float %225 to double
  %227 = call double @sqrt(double noundef %226) #6
  %228 = fmul double %227, 2.550000e+02
  %229 = fptosi double %228 to i32
  store i32 %229, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %230 = load i32, ptr %27, align 4, !tbaa !9
  %231 = and i32 %230, 248
  %232 = shl i32 %231, 5
  %233 = load i32, ptr %27, align 4, !tbaa !9
  %234 = and i32 %233, 248
  %235 = or i32 %232, %234
  %236 = shl i32 %235, 3
  %237 = load i32, ptr %27, align 4, !tbaa !9
  %238 = ashr i32 %237, 3
  %239 = or i32 %236, %238
  store i32 %239, ptr %28, align 4, !tbaa !9
  %240 = getelementptr inbounds [4 x %struct.ImVec2], ptr %25, i64 0, i64 0
  %241 = getelementptr inbounds [4 x %struct.ImVec2], ptr %25, i64 0, i64 1
  %242 = getelementptr inbounds [4 x %struct.ImVec2], ptr %25, i64 0, i64 2
  %243 = getelementptr inbounds [4 x %struct.ImVec2], ptr %25, i64 0, i64 3
  %244 = load i32, ptr %28, align 4, !tbaa !9
  %245 = load <2 x float>, ptr %240, align 16
  %246 = load <2 x float>, ptr %241, align 8
  %247 = load <2 x float>, ptr %242, align 16
  %248 = load <2 x float>, ptr %243, align 8
  call void @addQuad(<2 x float> %245, <2 x float> %246, <2 x float> %247, <2 x float> %248, i32 noundef %244)
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #6
  br label %249

249:                                              ; preds = %189
  %250 = load i32, ptr %19, align 4, !tbaa !9
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %19, align 4, !tbaa !9
  br label %186, !llvm.loop !14

252:                                              ; preds = %186
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %9, align 4, !tbaa !9
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %9, align 4, !tbaa !9
  br label %31, !llvm.loop !15

256:                                              ; preds = %34
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @conv(<2 x float>, float noundef, <2 x float>, <2 x float>) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @vec2_add(<2 x float>, <2 x float>) #2

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @R(<2 x float>, float noundef) #0

; Function Attrs: nounwind
declare float @cosf(float noundef) #3

; Function Attrs: nounwind
declare float @sinf(float noundef) #3

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @vec2_mul(<2 x float>, <2 x float>) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


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

; Function Attrs: nounwind uwtable
declare dso_local void @addQuad(<2 x float>, <2 x float>, <2 x float>, <2 x float>, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @vec2(float noundef, float noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @FX(<2 x float> %0, <2 x float> %1, <2 x float> %2, float noundef %3) local_unnamed_addr #0 {
  %5 = fmul float %3, 4.000000e+00
  %6 = tail call float @llvm.floor.f32(float %5)
  %7 = fsub float %5, %6
  %8 = fpext float %7 to double
  %9 = fneg double %8
  %10 = fneg float %5
  %11 = fpext float %10 to double
  br label %.preheader

12:                                               ; preds = %.preheader
  ret void

.preheader:                                       ; preds = %4, %.preheader
  %.062 = phi i32 [ 0, %4 ], [ %149, %.preheader ]
  %13 = uitofp nneg i32 %.062 to double
  %14 = fsub double 2.100000e+01, %13
  %15 = tail call double @llvm.fmuladd.f64(double %9, double 2.000000e+00, double %14)
  %16 = fptrunc double %15 to float
  %17 = fpext float %16 to double
  %18 = tail call double @llvm.fmuladd.f64(double %11, double 2.100000e+00, double %17)
  %19 = fptrunc double %18 to float
  %20 = tail call double @llvm.fmuladd.f64(double %17, double 2.000000e-01, double %11)
  %21 = fptrunc double %20 to float
  %22 = fadd double %17, 1.000000e+00
  %23 = tail call double @llvm.fmuladd.f64(double %22, double 2.000000e-01, double %11)
  %24 = fptrunc double %23 to float
  %25 = fadd float %5, %16
  %26 = fpext float %25 to double
  %27 = fmul double %26, 1.000000e-01
  %28 = fptrunc double %27 to float
  %29 = tail call float @cosf(float noundef %28) #4
  %30 = fpext float %29 to double
  %31 = tail call double @llvm.fmuladd.f64(double %30, double 2.000000e-01, double 1.000000e+00)
  %32 = fptrunc double %31 to float
  %33 = tail call float @sinf(float noundef %28) #4
  %34 = fpext float %33 to double
  %35 = tail call double @llvm.fmuladd.f64(double %34, double 2.000000e-01, double 1.000000e+00)
  %36 = fptrunc double %35 to float
  %37 = tail call <2 x float> @vec2(float noundef %32, float noundef %36)
  %38 = fadd double %26, 1.000000e+00
  %39 = fmul double %38, 1.000000e-01
  %40 = fptrunc double %39 to float
  %41 = tail call float @cosf(float noundef %40) #4
  %42 = fpext float %41 to double
  %43 = tail call double @llvm.fmuladd.f64(double %42, double 2.000000e-01, double 1.000000e+00)
  %44 = fptrunc double %43 to float
  %45 = tail call float @sinf(float noundef %40) #4
  %46 = fpext float %45 to double
  %47 = tail call double @llvm.fmuladd.f64(double %46, double 2.000000e-01, double 1.000000e+00)
  %48 = fptrunc double %47 to float
  %49 = tail call <2 x float> @vec2(float noundef %44, float noundef %48)
  %50 = tail call float @cosf(float noundef %21) #4
  %51 = fmul float %50, 0x3FD3333340000000
  %52 = tail call float @sinf(float noundef %21) #4
  %53 = fmul float %52, 0x3FD3333340000000
  %54 = tail call <2 x float> @vec2(float noundef %51, float noundef %53)
  %55 = tail call float @cosf(float noundef %24) #4
  %56 = fmul float %55, 0x3FD3333340000000
  %57 = tail call float @sinf(float noundef %24) #4
  %58 = fmul float %57, 0x3FD3333340000000
  %59 = tail call <2 x float> @vec2(float noundef %56, float noundef %58)
  %60 = tail call <2 x float> @vec2(float noundef -1.000000e+00, float noundef -1.000000e+00)
  %61 = tail call <2 x float> @vec2(float noundef 1.000000e+00, float noundef -1.000000e+00)
  %62 = tail call <2 x float> @vec2(float noundef 1.000000e+00, float noundef 1.000000e+00)
  %63 = tail call <2 x float> @vec2(float noundef -1.000000e+00, float noundef 1.000000e+00)
  %64 = tail call <2 x float> @vec2_mul(<2 x float> %60, <2 x float> %37)
  %65 = tail call <2 x float> @vec2_add(<2 x float> %64, <2 x float> %54)
  %66 = fadd float %19, 0.000000e+00
  %67 = tail call <2 x float> @R(<2 x float> %65, float noundef %66)
  %68 = fadd float %16, 0.000000e+00
  %69 = fmul float %68, 2.000000e+00
  %70 = tail call <2 x float> @conv(<2 x float> %67, float noundef %69, <2 x float> %2, <2 x float> %0)
  %71 = tail call <2 x float> @vec2_mul(<2 x float> %61, <2 x float> %37)
  %72 = tail call <2 x float> @vec2_add(<2 x float> %71, <2 x float> %54)
  %73 = tail call <2 x float> @R(<2 x float> %72, float noundef %66)
  %74 = tail call <2 x float> @conv(<2 x float> %73, float noundef %69, <2 x float> %2, <2 x float> %0)
  %75 = tail call <2 x float> @vec2_mul(<2 x float> %62, <2 x float> %37)
  %76 = tail call <2 x float> @vec2_add(<2 x float> %75, <2 x float> %54)
  %77 = tail call <2 x float> @R(<2 x float> %76, float noundef %66)
  %78 = tail call <2 x float> @conv(<2 x float> %77, float noundef %69, <2 x float> %2, <2 x float> %0)
  %79 = tail call <2 x float> @vec2_mul(<2 x float> %63, <2 x float> %37)
  %80 = tail call <2 x float> @vec2_add(<2 x float> %79, <2 x float> %54)
  %81 = tail call <2 x float> @R(<2 x float> %80, float noundef %66)
  %82 = tail call <2 x float> @conv(<2 x float> %81, float noundef %69, <2 x float> %2, <2 x float> %0)
  %83 = tail call <2 x float> @vec2_mul(<2 x float> %60, <2 x float> %49)
  %84 = tail call <2 x float> @vec2_add(<2 x float> %83, <2 x float> %59)
  %85 = fadd float %19, 1.000000e+00
  %86 = tail call <2 x float> @R(<2 x float> %84, float noundef %85)
  %87 = fadd float %16, 1.000000e+00
  %88 = fmul float %87, 2.000000e+00
  %89 = tail call <2 x float> @conv(<2 x float> %86, float noundef %88, <2 x float> %2, <2 x float> %0)
  %90 = tail call <2 x float> @vec2_mul(<2 x float> %61, <2 x float> %49)
  %91 = tail call <2 x float> @vec2_add(<2 x float> %90, <2 x float> %59)
  %92 = tail call <2 x float> @R(<2 x float> %91, float noundef %85)
  %93 = tail call <2 x float> @conv(<2 x float> %92, float noundef %88, <2 x float> %2, <2 x float> %0)
  %94 = tail call <2 x float> @vec2_mul(<2 x float> %62, <2 x float> %49)
  %95 = tail call <2 x float> @vec2_add(<2 x float> %94, <2 x float> %59)
  %96 = tail call <2 x float> @R(<2 x float> %95, float noundef %85)
  %97 = tail call <2 x float> @conv(<2 x float> %96, float noundef %88, <2 x float> %2, <2 x float> %0)
  %98 = tail call <2 x float> @vec2_mul(<2 x float> %63, <2 x float> %49)
  %99 = tail call <2 x float> @vec2_add(<2 x float> %98, <2 x float> %59)
  %100 = tail call <2 x float> @R(<2 x float> %99, float noundef %85)
  %101 = tail call <2 x float> @conv(<2 x float> %100, float noundef %88, <2 x float> %2, <2 x float> %0)
  %102 = and i32 %.062, 1
  %.not = icmp eq i32 %102, 0
  %103 = select i1 %.not, double 6.000000e-01, double 5.000000e-01
  %104 = fsub double 2.100000e+01, %17
  %105 = fdiv double %104, 2.100000e+01
  %106 = fmul double %105, %103
  %107 = fptrunc double %106 to float
  %108 = fpext float %107 to double
  %109 = tail call double @sqrt(double noundef %108) #4
  %110 = fmul double %109, 2.550000e+02
  %111 = fptosi double %110 to i32
  %112 = and i32 %111, 248
  %113 = mul nuw nsw i32 %112, 264
  %114 = ashr i32 %111, 3
  %115 = or i32 %113, %114
  tail call void @addQuad(<2 x float> %70, <2 x float> %74, <2 x float> %93, <2 x float> %89, i32 noundef %115)
  %116 = fadd double %103, 5.000000e-02
  %117 = fmul double %105, %116
  %118 = fptrunc double %117 to float
  %119 = fpext float %118 to double
  %120 = tail call double @sqrt(double noundef %119) #4
  %121 = fmul double %120, 2.550000e+02
  %122 = fptosi double %121 to i32
  %123 = and i32 %122, 248
  %124 = mul nuw nsw i32 %123, 264
  %125 = ashr i32 %122, 3
  %126 = or i32 %124, %125
  tail call void @addQuad(<2 x float> %74, <2 x float> %78, <2 x float> %97, <2 x float> %93, i32 noundef %126)
  %127 = fadd double %103, 1.000000e-01
  %128 = fmul double %105, %127
  %129 = fptrunc double %128 to float
  %130 = fpext float %129 to double
  %131 = tail call double @sqrt(double noundef %130) #4
  %132 = fmul double %131, 2.550000e+02
  %133 = fptosi double %132 to i32
  %134 = and i32 %133, 248
  %135 = mul nuw nsw i32 %134, 264
  %136 = ashr i32 %133, 3
  %137 = or i32 %135, %136
  tail call void @addQuad(<2 x float> %78, <2 x float> %82, <2 x float> %101, <2 x float> %97, i32 noundef %137)
  %138 = fadd double %103, 0x3FC3333333333334
  %139 = fmul double %105, %138
  %140 = fptrunc double %139 to float
  %141 = fpext float %140 to double
  %142 = tail call double @sqrt(double noundef %141) #4
  %143 = fmul double %142, 2.550000e+02
  %144 = fptosi double %143 to i32
  %145 = and i32 %144, 248
  %146 = mul nuw nsw i32 %145, 264
  %147 = ashr i32 %144, 3
  %148 = or i32 %146, %147
  tail call void @addQuad(<2 x float> %82, <2 x float> %70, <2 x float> %89, <2 x float> %101, i32 noundef %148)
  %149 = add nuw nsw i32 %.062, 1
  %exitcond.not = icmp eq i32 %149, 20
  br i1 %exitcond.not, label %12, label %.preheader, !llvm.loop !5
}

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @conv(<2 x float>, float noundef, <2 x float>, <2 x float>) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @vec2_add(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local <2 x float> @R(<2 x float>, float noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sinf(float noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @vec2_mul(<2 x float>, <2 x float>) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { inlinehint nounwind uwtable "min-legal-vector-width"="64" "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 memory(write) "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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass