; LLVM IR from yettabaa/cub3D :: Mandatory (raycasting)

; 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.s_norme1 = type { double, double, double, double, double, double, double, double, double }
%struct.s_data = type { double, double, double, double, double, double, double, double, double, double, i32, double, double, ptr, %struct.s_sprites, %struct.s_minimap, %struct.s_door, %struct.s_textures, %struct.s_hook, %struct.s_map_result, %struct.s_rycast, %struct.s_mlx, ptr }
%struct.s_sprites = type { ptr, i32, i32, i32, i32, i32, i32 }
%struct.s_minimap = type { double, double, double, double, double }
%struct.s_door = type { ptr, i32, i32, i32 }
%struct.s_textures = type { i32, ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32, ptr, i32, i32, i32 }
%struct.s_hook = type { double, i32, double, double, double }
%struct.s_map_result = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i8 }
%struct.s_rycast = type { double, double, double, double, double, double, double, double, double }
%struct.s_mlx = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i32 }

; Function Attrs: nounwind uwtable
define dso_local void @steps(ptr noundef %0, double noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca %struct.s_norme1, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 72, ptr %5) #5
  %6 = load ptr, ptr %3, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.s_data, ptr %6, i32 0, i32 2
  %8 = load double, ptr %7, align 8, !tbaa !11
  %9 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 4
  store double %8, ptr %9, align 8, !tbaa !22
  %10 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 3
  store double 0.000000e+00, ptr %10, align 8, !tbaa !24
  %11 = load double, ptr %4, align 8, !tbaa !9
  %12 = fcmp une double %11, 0.000000e+00
  br i1 %12, label %13, label %26

13:                                               ; preds = %2
  %14 = load double, ptr %4, align 8, !tbaa !9
  %15 = fcmp une double %14, 1.800000e+02
  br i1 %15, label %16, label %26

16:                                               ; preds = %13
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.s_data, ptr %17, i32 0, i32 2
  %19 = load double, ptr %18, align 8, !tbaa !11
  %20 = load double, ptr %4, align 8, !tbaa !9
  %21 = call double @rad(double noundef %20)
  %22 = call double @tan(double noundef %21) #5
  %23 = fdiv double %19, %22
  %24 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 3
  store double %23, ptr %24, align 8, !tbaa !24
  %25 = fcmp une double %23, 0.000000e+00
  br label %26

26:                                               ; preds = %16, %13, %2
  %27 = phi i1 [ false, %13 ], [ false, %2 ], [ %25, %16 ]
  %28 = zext i1 %27 to i32
  %29 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 3
  %30 = load double, ptr %29, align 8, !tbaa !24
  %31 = call double @pow(double noundef %30, double noundef 2.000000e+00) #5
  %32 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 4
  %33 = load double, ptr %32, align 8, !tbaa !22
  %34 = call double @pow(double noundef %33, double noundef 2.000000e+00) #5
  %35 = fadd double %31, %34
  %36 = call double @sqrt(double noundef %35) #5
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.s_data, ptr %37, i32 0, i32 20
  %39 = getelementptr inbounds %struct.s_rycast, ptr %38, i32 0, i32 5
  store double %36, ptr %39, align 8, !tbaa !25
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.s_data, ptr %40, i32 0, i32 1
  %42 = load double, ptr %41, align 8, !tbaa !26
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.s_data, ptr %43, i32 0, i32 2
  %45 = load double, ptr %44, align 8, !tbaa !11
  %46 = fdiv double %42, %45
  %47 = call double @llvm.floor.f64(double %46)
  %48 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 0
  store double %47, ptr %48, align 8, !tbaa !27
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.s_data, ptr %49, i32 0, i32 1
  %51 = load double, ptr %50, align 8, !tbaa !26
  %52 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 0
  %53 = load double, ptr %52, align 8, !tbaa !27
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.s_data, ptr %54, i32 0, i32 2
  %56 = load double, ptr %55, align 8, !tbaa !11
  %57 = fneg double %53
  %58 = call double @llvm.fmuladd.f64(double %57, double %56, double %51)
  %59 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 2
  store double %58, ptr %59, align 8, !tbaa !28
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  %61 = load double, ptr %4, align 8, !tbaa !9
  %62 = call i32 @is(ptr noundef %60, double noundef %61, i32 noundef 3)
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %68, label %64

64:                                               ; preds = %26
  %65 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 2
  %66 = load double, ptr %65, align 8, !tbaa !28
  %67 = fcmp une double %66, 0.000000e+00
  br i1 %67, label %84, label %68

68:                                               ; preds = %64, %26
  %69 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 0
  %70 = load double, ptr %69, align 8, !tbaa !27
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.s_data, ptr %71, i32 0, i32 2
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.s_data, ptr %74, i32 0, i32 2
  %76 = load double, ptr %75, align 8, !tbaa !11
  %77 = call double @llvm.fmuladd.f64(double %70, double %73, double %76)
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.s_data, ptr %78, i32 0, i32 1
  %80 = load double, ptr %79, align 8, !tbaa !26
  %81 = fsub double %77, %80
  %82 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 2
  store double %81, ptr %82, align 8, !tbaa !28
  %83 = fcmp une double %81, 0.000000e+00
  br label %84

84:                                               ; preds = %68, %64
  %85 = phi i1 [ false, %64 ], [ %83, %68 ]
  %86 = zext i1 %85 to i32
  %87 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 1
  store double 0.000000e+00, ptr %87, align 8, !tbaa !29
  %88 = load double, ptr %4, align 8, !tbaa !9
  %89 = fcmp une double %88, 0.000000e+00
  br i1 %89, label %90, label %102

90:                                               ; preds = %84
  %91 = load double, ptr %4, align 8, !tbaa !9
  %92 = fcmp une double %91, 1.800000e+02
  br i1 %92, label %93, label %102

93:                                               ; preds = %90
  %94 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 2
  %95 = load double, ptr %94, align 8, !tbaa !28
  %96 = load double, ptr %4, align 8, !tbaa !9
  %97 = call double @rad(double noundef %96)
  %98 = call double @tan(double noundef %97) #5
  %99 = fdiv double %95, %98
  %100 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 1
  store double %99, ptr %100, align 8, !tbaa !29
  %101 = fcmp une double %99, 0.000000e+00
  br label %102

102:                                              ; preds = %93, %90, %84
  %103 = phi i1 [ false, %90 ], [ false, %84 ], [ %101, %93 ]
  %104 = zext i1 %103 to i32
  %105 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 1
  %106 = load double, ptr %105, align 8, !tbaa !29
  %107 = call double @pow(double noundef %106, double noundef 2.000000e+00) #5
  %108 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 2
  %109 = load double, ptr %108, align 8, !tbaa !28
  %110 = call double @pow(double noundef %109, double noundef 2.000000e+00) #5
  %111 = fadd double %107, %110
  %112 = call double @sqrt(double noundef %111) #5
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.s_data, ptr %113, i32 0, i32 20
  %115 = getelementptr inbounds %struct.s_rycast, ptr %114, i32 0, i32 3
  store double %112, ptr %115, align 8, !tbaa !30
  %116 = load ptr, ptr %3, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.s_data, ptr %116, i32 0, i32 2
  %118 = load double, ptr %117, align 8, !tbaa !11
  %119 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 7
  store double %118, ptr %119, align 8, !tbaa !31
  %120 = load ptr, ptr %3, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.s_data, ptr %120, i32 0, i32 2
  %122 = load double, ptr %121, align 8, !tbaa !11
  %123 = load double, ptr %4, align 8, !tbaa !9
  %124 = call double @rad(double noundef %123)
  %125 = call double @tan(double noundef %124) #5
  %126 = fmul double %122, %125
  %127 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 8
  store double %126, ptr %127, align 8, !tbaa !32
  %128 = load double, ptr %4, align 8, !tbaa !9
  %129 = fcmp oeq double %128, 9.000000e+01
  br i1 %129, label %133, label %130

130:                                              ; preds = %102
  %131 = load double, ptr %4, align 8, !tbaa !9
  %132 = fcmp oeq double %131, 2.700000e+02
  br i1 %132, label %133, label %135

133:                                              ; preds = %130, %102
  %134 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 8
  store double 0.000000e+00, ptr %134, align 8, !tbaa !32
  br label %135

135:                                              ; preds = %133, %130
  %136 = phi i1 [ false, %130 ], [ false, %133 ]
  %137 = zext i1 %136 to i32
  %138 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 7
  %139 = load double, ptr %138, align 8, !tbaa !31
  %140 = call double @pow(double noundef %139, double noundef 2.000000e+00) #5
  %141 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 8
  %142 = load double, ptr %141, align 8, !tbaa !32
  %143 = call double @pow(double noundef %142, double noundef 2.000000e+00) #5
  %144 = fadd double %140, %143
  %145 = call double @sqrt(double noundef %144) #5
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.s_data, ptr %146, i32 0, i32 20
  %148 = getelementptr inbounds %struct.s_rycast, ptr %147, i32 0, i32 6
  store double %145, ptr %148, align 8, !tbaa !33
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.s_data, ptr %149, i32 0, i32 0
  %151 = load double, ptr %150, align 8, !tbaa !34
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.s_data, ptr %152, i32 0, i32 2
  %154 = load double, ptr %153, align 8, !tbaa !11
  %155 = fdiv double %151, %154
  %156 = call double @llvm.floor.f64(double %155)
  %157 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 0
  store double %156, ptr %157, align 8, !tbaa !27
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.s_data, ptr %158, i32 0, i32 0
  %160 = load double, ptr %159, align 8, !tbaa !34
  %161 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 0
  %162 = load double, ptr %161, align 8, !tbaa !27
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.s_data, ptr %163, i32 0, i32 2
  %165 = load double, ptr %164, align 8, !tbaa !11
  %166 = fneg double %162
  %167 = call double @llvm.fmuladd.f64(double %166, double %165, double %160)
  %168 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 5
  store double %167, ptr %168, align 8, !tbaa !35
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = load double, ptr %4, align 8, !tbaa !9
  %171 = call i32 @is(ptr noundef %169, double noundef %170, i32 noundef 5)
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %173, label %189

173:                                              ; preds = %135
  %174 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 0
  %175 = load double, ptr %174, align 8, !tbaa !27
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.s_data, ptr %176, i32 0, i32 2
  %178 = load double, ptr %177, align 8, !tbaa !11
  %179 = load ptr, ptr %3, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.s_data, ptr %179, i32 0, i32 2
  %181 = load double, ptr %180, align 8, !tbaa !11
  %182 = call double @llvm.fmuladd.f64(double %175, double %178, double %181)
  %183 = load ptr, ptr %3, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.s_data, ptr %183, i32 0, i32 0
  %185 = load double, ptr %184, align 8, !tbaa !34
  %186 = fsub double %182, %185
  %187 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 5
  store double %186, ptr %187, align 8, !tbaa !35
  %188 = fcmp une double %186, 0.000000e+00
  br label %189

189:                                              ; preds = %173, %135
  %190 = phi i1 [ false, %135 ], [ %188, %173 ]
  %191 = zext i1 %190 to i32
  %192 = load double, ptr %4, align 8, !tbaa !9
  %193 = fcmp oeq double %192, 2.700000e+02
  br i1 %193, label %197, label %194

194:                                              ; preds = %189
  %195 = load double, ptr %4, align 8, !tbaa !9
  %196 = fcmp oeq double %195, 9.000000e+01
  br i1 %196, label %197, label %199

197:                                              ; preds = %194, %189
  %198 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 5
  store double 0.000000e+00, ptr %198, align 8, !tbaa !35
  br label %199

199:                                              ; preds = %197, %194
  %200 = phi i1 [ false, %194 ], [ false, %197 ]
  %201 = zext i1 %200 to i32
  %202 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 5
  %203 = load double, ptr %202, align 8, !tbaa !35
  %204 = load double, ptr %4, align 8, !tbaa !9
  %205 = call double @rad(double noundef %204)
  %206 = call double @tan(double noundef %205) #5
  %207 = fmul double %203, %206
  %208 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 6
  store double %207, ptr %208, align 8, !tbaa !36
  %209 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 5
  %210 = load double, ptr %209, align 8, !tbaa !35
  %211 = call double @pow(double noundef %210, double noundef 2.000000e+00) #5
  %212 = call double @llvm.fabs.f64(double %211)
  %213 = getelementptr inbounds %struct.s_norme1, ptr %5, i32 0, i32 6
  %214 = load double, ptr %213, align 8, !tbaa !36
  %215 = call double @pow(double noundef %214, double noundef 2.000000e+00) #5
  %216 = call double @llvm.fabs.f64(double %215)
  %217 = fadd double %212, %216
  %218 = call double @sqrt(double noundef %217) #5
  %219 = load ptr, ptr %3, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.s_data, ptr %219, i32 0, i32 20
  %221 = getelementptr inbounds %struct.s_rycast, ptr %220, i32 0, i32 4
  store double %218, ptr %221, align 8, !tbaa !37
  call void @llvm.lifetime.end.p0(i64 72, ptr %5) #5
  ret void
}

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

; Function Attrs: nounwind
declare double @tan(double noundef) #2

declare double @rad(double noundef) #3

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

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #2

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

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

declare i32 @is(ptr noundef, double noundef, i32 noundef) #3

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"s_data", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !13, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !14, i64 112, !15, i64 144, !16, i64 184, !17, i64 208, !18, i64 336, !19, i64 376, !20, i64 456, !21, i64 528, !6, i64 584}
!13 = !{!"int", !7, i64 0}
!14 = !{!"s_sprites", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!15 = !{!"s_minimap", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!16 = !{!"s_door", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!17 = !{!"s_textures", !13, i64 0, !6, i64 8, !13, i64 16, !13, i64 20, !13, i64 24, !6, i64 32, !13, i64 40, !13, i64 44, !13, i64 48, !6, i64 56, !13, i64 64, !13, i64 68, !13, i64 72, !6, i64 80, !13, i64 88, !13, i64 92, !13, i64 96, !6, i64 104, !13, i64 112, !13, i64 116, !13, i64 120}
!18 = !{!"s_hook", !10, i64 0, !13, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!19 = !{!"s_map_result", !13, i64 0, !13, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !7, i64 72}
!20 = !{!"s_rycast", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!21 = !{!"s_mlx", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !13, i64 44, !13, i64 48}
!22 = !{!23, !10, i64 32}
!23 = !{!"s_norme1", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!24 = !{!23, !10, i64 24}
!25 = !{!12, !10, i64 496}
!26 = !{!12, !10, i64 8}
!27 = !{!23, !10, i64 0}
!28 = !{!23, !10, i64 16}
!29 = !{!23, !10, i64 8}
!30 = !{!12, !10, i64 480}
!31 = !{!23, !10, i64 56}
!32 = !{!23, !10, i64 64}
!33 = !{!12, !10, i64 504}
!34 = !{!12, !10, i64 0}
!35 = !{!23, !10, i64 40}
!36 = !{!23, !10, i64 48}
!37 = !{!12, !10, i64 488}


; 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
define dso_local void @steps(ptr noundef %0, double noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = load double, ptr %3, align 8, !tbaa !5
  %5 = fcmp une double %1, 0.000000e+00
  %6 = fcmp une double %1, 1.800000e+02
  %or.cond = and i1 %5, %6
  br i1 %or.cond, label %7, label %11

7:                                                ; preds = %2
  %8 = tail call double @rad(double noundef %1) #5
  %9 = tail call double @tan(double noundef %8) #5
  %10 = fdiv double %4, %9
  %.pre = load double, ptr %3, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %7, %2
  %12 = phi double [ %.pre, %7 ], [ %4, %2 ]
  %.sroa.16.0 = phi double [ %10, %7 ], [ 0.000000e+00, %2 ]
  %square = fmul double %.sroa.16.0, %.sroa.16.0
  %square55 = fmul double %4, %4
  %13 = fadd double %square55, %square
  %sqrt = tail call double @llvm.sqrt.f64(double %13)
  %14 = getelementptr inbounds i8, ptr %0, i64 496
  store double %sqrt, ptr %14, align 8, !tbaa !20
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load double, ptr %15, align 8, !tbaa !21
  %17 = fdiv double %16, %12
  %18 = tail call double @llvm.floor.f64(double %17)
  %19 = fneg double %18
  %20 = tail call double @llvm.fmuladd.f64(double %19, double %12, double %16)
  %21 = tail call i32 @is(ptr noundef nonnull %0, double noundef %1, i32 noundef 3) #5
  %22 = icmp eq i32 %21, 0
  %23 = fcmp une double %20, 0.000000e+00
  %or.cond4 = select i1 %22, i1 %23, i1 false
  br i1 %or.cond4, label %29, label %24

24:                                               ; preds = %11
  %25 = load double, ptr %3, align 8, !tbaa !5
  %26 = tail call double @llvm.fmuladd.f64(double %18, double %25, double %25)
  %27 = load double, ptr %15, align 8, !tbaa !21
  %28 = fsub double %26, %27
  br label %29

29:                                               ; preds = %11, %24
  %.sroa.11.0 = phi double [ %20, %11 ], [ %28, %24 ]
  br i1 %or.cond, label %30, label %34

30:                                               ; preds = %29
  %31 = tail call double @rad(double noundef %1) #5
  %32 = tail call double @tan(double noundef %31) #5
  %33 = fdiv double %.sroa.11.0, %32
  br label %34

34:                                               ; preds = %30, %29
  %.sroa.8.0 = phi double [ %33, %30 ], [ 0.000000e+00, %29 ]
  %square56 = fmul double %.sroa.8.0, %.sroa.8.0
  %square57 = fmul double %.sroa.11.0, %.sroa.11.0
  %35 = fadd double %square57, %square56
  %sqrt63 = tail call double @llvm.sqrt.f64(double %35)
  %36 = getelementptr inbounds i8, ptr %0, i64 480
  store double %sqrt63, ptr %36, align 8, !tbaa !22
  %37 = load double, ptr %3, align 8, !tbaa !5
  %38 = tail call double @rad(double noundef %1) #5
  %39 = tail call double @tan(double noundef %38) #5
  %40 = fmul double %37, %39
  %41 = fcmp oeq double %1, 9.000000e+01
  %42 = fcmp oeq double %1, 2.700000e+02
  %or.cond8 = or i1 %41, %42
  %.sroa.30.0 = select i1 %or.cond8, double 0.000000e+00, double %40
  %square58 = fmul double %37, %37
  %square59 = fmul double %.sroa.30.0, %.sroa.30.0
  %43 = fadd double %square58, %square59
  %sqrt62 = tail call double @llvm.sqrt.f64(double %43)
  %44 = getelementptr inbounds i8, ptr %0, i64 504
  store double %sqrt62, ptr %44, align 8, !tbaa !23
  %45 = load double, ptr %0, align 8, !tbaa !24
  %46 = load double, ptr %3, align 8, !tbaa !5
  %47 = fdiv double %45, %46
  %48 = tail call double @llvm.floor.f64(double %47)
  %49 = fneg double %48
  %50 = tail call double @llvm.fmuladd.f64(double %49, double %46, double %45)
  %51 = tail call i32 @is(ptr noundef nonnull %0, double noundef %1, i32 noundef 5) #5
  %.not = icmp eq i32 %51, 0
  br i1 %.not, label %57, label %52

52:                                               ; preds = %34
  %53 = load double, ptr %3, align 8, !tbaa !5
  %54 = tail call double @llvm.fmuladd.f64(double %48, double %53, double %53)
  %55 = load double, ptr %0, align 8, !tbaa !24
  %56 = fsub double %54, %55
  br label %57

57:                                               ; preds = %52, %34
  %.sroa.21.0 = phi double [ %56, %52 ], [ %50, %34 ]
  %.sroa.21.1 = select i1 %or.cond8, double 0.000000e+00, double %.sroa.21.0
  %58 = tail call double @rad(double noundef %1) #5
  %59 = tail call double @tan(double noundef %58) #5
  %60 = fmul double %.sroa.21.1, %59
  %61 = insertelement <2 x double> poison, double %.sroa.21.1, i64 0
  %62 = insertelement <2 x double> %61, double %60, i64 1
  %63 = fmul <2 x double> %62, %62
  %64 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %63)
  %shift = shufflevector <2 x double> %64, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %65 = fadd <2 x double> %64, %shift
  %66 = extractelement <2 x double> %65, i64 0
  %sqrt64 = tail call double @llvm.sqrt.f64(double %66)
  %67 = getelementptr inbounds i8, ptr %0, i64 488
  store double %sqrt64, ptr %67, align 8, !tbaa !25
  ret void
}

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

declare double @rad(double noundef) local_unnamed_addr #2

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

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

declare i32 @is(ptr noundef, double noundef, i32 noundef) local_unnamed_addr #2

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 16}
!6 = !{!"s_data", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !10, i64 80, !7, i64 88, !7, i64 96, !11, i64 104, !12, i64 112, !13, i64 144, !14, i64 184, !15, i64 208, !16, i64 336, !17, i64 376, !18, i64 456, !19, i64 528, !11, i64 584}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"s_sprites", !11, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!"s_minimap", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!14 = !{!"s_door", !11, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!15 = !{!"s_textures", !10, i64 0, !11, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !11, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !11, i64 80, !10, i64 88, !10, i64 92, !10, i64 96, !11, i64 104, !10, i64 112, !10, i64 116, !10, i64 120}
!16 = !{!"s_hook", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!17 = !{!"s_map_result", !10, i64 0, !10, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !8, i64 72}
!18 = !{!"s_rycast", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!19 = !{!"s_mlx", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !10, i64 44, !10, i64 48}
!20 = !{!6, !7, i64 496}
!21 = !{!6, !7, i64 8}
!22 = !{!6, !7, i64 480}
!23 = !{!6, !7, i64 504}
!24 = !{!6, !7, i64 0}
!25 = !{!6, !7, i64 488}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass