; 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_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
declare dso_local void @steps(ptr noundef, double noundef) #0

declare double @rad(double noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local double @raycasting(ptr noundef %0, double noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store double %1, ptr %4, align 8, !tbaa !9
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %6 = load double, ptr %4, align 8, !tbaa !9
  call void @steps(ptr noundef %5, double noundef %6)
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = load double, ptr %4, align 8, !tbaa !9
  call void @inc_smal_steps(ptr noundef %7, double noundef %8)
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = load double, ptr %4, align 8, !tbaa !9
  call void @inc_big_steps(ptr noundef %9, double noundef %10)
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.s_data, ptr %11, i32 0, i32 20
  %13 = getelementptr inbounds %struct.s_rycast, ptr %12, i32 0, i32 7
  %14 = load double, ptr %13, align 8, !tbaa !11
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.s_data, ptr %15, i32 0, i32 20
  %17 = getelementptr inbounds %struct.s_rycast, ptr %16, i32 0, i32 8
  %18 = load double, ptr %17, align 8, !tbaa !22
  %19 = call double @llvm.minnum.f64(double %14, double %18)
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.s_data, ptr %20, i32 0, i32 5
  store double %19, ptr %21, align 8, !tbaa !23
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.s_data, ptr %22, i32 0, i32 20
  %24 = getelementptr inbounds %struct.s_rycast, ptr %23, i32 0, i32 7
  %25 = load double, ptr %24, align 8, !tbaa !11
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.s_data, ptr %26, i32 0, i32 20
  %28 = getelementptr inbounds %struct.s_rycast, ptr %27, i32 0, i32 8
  %29 = load double, ptr %28, align 8, !tbaa !22
  %30 = call double @llvm.minnum.f64(double %25, double %29)
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.s_data, ptr %31, i32 0, i32 3
  %33 = load double, ptr %32, align 8, !tbaa !24
  %34 = load double, ptr %4, align 8, !tbaa !9
  %35 = fsub double %33, %34
  %36 = call double @rad(double noundef %35)
  %37 = call double @cos(double noundef %36) #4
  %38 = fmul double %30, %37
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.s_data, ptr %39, i32 0, i32 6
  store double %38, ptr %40, align 8, !tbaa !25
  %41 = load ptr, ptr %3, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.s_data, ptr %41, i32 0, i32 20
  %43 = getelementptr inbounds %struct.s_rycast, ptr %42, i32 0, i32 8
  %44 = load double, ptr %43, align 8, !tbaa !22
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.s_data, ptr %45, i32 0, i32 20
  %47 = getelementptr inbounds %struct.s_rycast, ptr %46, i32 0, i32 7
  %48 = load double, ptr %47, align 8, !tbaa !11
  %49 = fcmp ogt double %44, %48
  br i1 %49, label %50, label %68

50:                                               ; preds = %2
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.s_data, ptr %51, i32 0, i32 20
  %53 = getelementptr inbounds %struct.s_rycast, ptr %52, i32 0, i32 5
  %54 = load double, ptr %53, align 8, !tbaa !26
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.s_data, ptr %55, i32 0, i32 20
  %57 = getelementptr inbounds %struct.s_rycast, ptr %56, i32 0, i32 6
  %58 = load double, ptr %57, align 8, !tbaa !27
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.s_data, ptr %59, i32 0, i32 4
  %61 = load double, ptr %60, align 8, !tbaa !28
  %62 = fadd double %58, %61
  %63 = fcmp ogt double %54, %62
  br i1 %63, label %64, label %68

64:                                               ; preds = %50
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.s_data, ptr %65, i32 0, i32 17
  %67 = getelementptr inbounds %struct.s_textures, ptr %66, i32 0, i32 0
  store i32 8, ptr %67, align 8, !tbaa !29
  br label %155

68:                                               ; preds = %50, %2
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.s_data, ptr %69, i32 0, i32 20
  %71 = getelementptr inbounds %struct.s_rycast, ptr %70, i32 0, i32 8
  %72 = load double, ptr %71, align 8, !tbaa !22
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.s_data, ptr %73, i32 0, i32 20
  %75 = getelementptr inbounds %struct.s_rycast, ptr %74, i32 0, i32 7
  %76 = load double, ptr %75, align 8, !tbaa !11
  %77 = fcmp olt double %72, %76
  br i1 %77, label %78, label %96

78:                                               ; preds = %68
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.s_data, ptr %79, i32 0, i32 20
  %81 = getelementptr inbounds %struct.s_rycast, ptr %80, i32 0, i32 5
  %82 = load double, ptr %81, align 8, !tbaa !26
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.s_data, ptr %83, i32 0, i32 4
  %85 = load double, ptr %84, align 8, !tbaa !28
  %86 = fadd double %82, %85
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.s_data, ptr %87, i32 0, i32 20
  %89 = getelementptr inbounds %struct.s_rycast, ptr %88, i32 0, i32 6
  %90 = load double, ptr %89, align 8, !tbaa !27
  %91 = fcmp olt double %86, %90
  br i1 %91, label %92, label %96

92:                                               ; preds = %78
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.s_data, ptr %93, i32 0, i32 17
  %95 = getelementptr inbounds %struct.s_textures, ptr %94, i32 0, i32 0
  store i32 8, ptr %95, align 8, !tbaa !29
  br label %154

96:                                               ; preds = %78, %68
  %97 = load ptr, ptr %3, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.s_data, ptr %97, i32 0, i32 20
  %99 = getelementptr inbounds %struct.s_rycast, ptr %98, i32 0, i32 8
  %100 = load double, ptr %99, align 8, !tbaa !22
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.s_data, ptr %101, i32 0, i32 20
  %103 = getelementptr inbounds %struct.s_rycast, ptr %102, i32 0, i32 7
  %104 = load double, ptr %103, align 8, !tbaa !11
  %105 = fcmp ogt double %100, %104
  br i1 %105, label %106, label %124

106:                                              ; preds = %96
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s_data, ptr %107, i32 0, i32 20
  %109 = getelementptr inbounds %struct.s_rycast, ptr %108, i32 0, i32 5
  %110 = load double, ptr %109, align 8, !tbaa !26
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.s_data, ptr %111, i32 0, i32 4
  %113 = load double, ptr %112, align 8, !tbaa !28
  %114 = fadd double %110, %113
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.s_data, ptr %115, i32 0, i32 20
  %117 = getelementptr inbounds %struct.s_rycast, ptr %116, i32 0, i32 6
  %118 = load double, ptr %117, align 8, !tbaa !27
  %119 = fcmp olt double %114, %118
  br i1 %119, label %120, label %124

120:                                              ; preds = %106
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.s_data, ptr %121, i32 0, i32 17
  %123 = getelementptr inbounds %struct.s_textures, ptr %122, i32 0, i32 0
  store i32 7, ptr %123, align 8, !tbaa !29
  br label %153

124:                                              ; preds = %106, %96
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.s_data, ptr %125, i32 0, i32 20
  %127 = getelementptr inbounds %struct.s_rycast, ptr %126, i32 0, i32 8
  %128 = load double, ptr %127, align 8, !tbaa !22
  %129 = load ptr, ptr %3, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.s_data, ptr %129, i32 0, i32 20
  %131 = getelementptr inbounds %struct.s_rycast, ptr %130, i32 0, i32 7
  %132 = load double, ptr %131, align 8, !tbaa !11
  %133 = fcmp olt double %128, %132
  br i1 %133, label %134, label %152

134:                                              ; preds = %124
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.s_data, ptr %135, i32 0, i32 20
  %137 = getelementptr inbounds %struct.s_rycast, ptr %136, i32 0, i32 5
  %138 = load double, ptr %137, align 8, !tbaa !26
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.s_data, ptr %139, i32 0, i32 20
  %141 = getelementptr inbounds %struct.s_rycast, ptr %140, i32 0, i32 6
  %142 = load double, ptr %141, align 8, !tbaa !27
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.s_data, ptr %143, i32 0, i32 4
  %145 = load double, ptr %144, align 8, !tbaa !28
  %146 = fadd double %142, %145
  %147 = fcmp ogt double %138, %146
  br i1 %147, label %148, label %152

148:                                              ; preds = %134
  %149 = load ptr, ptr %3, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.s_data, ptr %149, i32 0, i32 17
  %151 = getelementptr inbounds %struct.s_textures, ptr %150, i32 0, i32 0
  store i32 7, ptr %151, align 8, !tbaa !29
  br label %152

152:                                              ; preds = %148, %134, %124
  br label %153

153:                                              ; preds = %152, %120
  br label %154

154:                                              ; preds = %153, %92
  br label %155

155:                                              ; preds = %154, %64
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.s_data, ptr %156, i32 0, i32 0
  %158 = load double, ptr %157, align 8, !tbaa !30
  %159 = load ptr, ptr %3, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.s_data, ptr %159, i32 0, i32 5
  %161 = load double, ptr %160, align 8, !tbaa !23
  %162 = load double, ptr %4, align 8, !tbaa !9
  %163 = call double @rad(double noundef %162)
  %164 = call double @cos(double noundef %163) #4
  %165 = call double @llvm.fmuladd.f64(double %161, double %164, double %158)
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.s_data, ptr %166, i32 0, i32 8
  store double %165, ptr %167, align 8, !tbaa !31
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.s_data, ptr %168, i32 0, i32 1
  %170 = load double, ptr %169, align 8, !tbaa !32
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.s_data, ptr %171, i32 0, i32 5
  %173 = load double, ptr %172, align 8, !tbaa !23
  %174 = load double, ptr %4, align 8, !tbaa !9
  %175 = call double @rad(double noundef %174)
  %176 = call double @sin(double noundef %175) #4
  %177 = call double @llvm.fmuladd.f64(double %173, double %176, double %170)
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.s_data, ptr %178, i32 0, i32 9
  store double %177, ptr %179, align 8, !tbaa !33
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.s_data, ptr %180, i32 0, i32 5
  %182 = load double, ptr %181, align 8, !tbaa !23
  ret double %182
}

; Function Attrs: nounwind uwtable
declare hidden void @inc_smal_steps(ptr noundef, double noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @inc_big_steps(ptr noundef, double noundef) #0

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

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

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 512}
!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 = !{!12, !10, i64 520}
!23 = !{!12, !10, i64 40}
!24 = !{!12, !10, i64 24}
!25 = !{!12, !10, i64 48}
!26 = !{!12, !10, i64 496}
!27 = !{!12, !10, i64 504}
!28 = !{!12, !10, i64 32}
!29 = !{!12, !13, i64 208}
!30 = !{!12, !10, i64 0}
!31 = !{!12, !10, i64 64}
!32 = !{!12, !10, i64 8}
!33 = !{!12, !10, i64 72}


; 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 @steps(ptr noundef, double noundef) local_unnamed_addr #0

declare double @rad(double noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local double @raycasting(ptr noundef %0, double noundef %1) local_unnamed_addr #0 {
  tail call void @steps(ptr noundef %0, double noundef %1)
  tail call void @inc_smal_steps(ptr noundef %0, double noundef %1)
  tail call void @inc_big_steps(ptr noundef %0, double noundef %1)
  %3 = getelementptr inbounds i8, ptr %0, i64 512
  %4 = load double, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 520
  %6 = load double, ptr %5, align 8, !tbaa !20
  %7 = tail call double @llvm.minnum.f64(double %4, double %6)
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  store double %7, ptr %8, align 8, !tbaa !21
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load double, ptr %9, align 8, !tbaa !22
  %11 = fsub double %10, %1
  %12 = tail call double @rad(double noundef %11) #4
  %13 = tail call double @cos(double noundef %12) #4
  %14 = fmul double %7, %13
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  store double %14, ptr %15, align 8, !tbaa !23
  %16 = load double, ptr %5, align 8, !tbaa !20
  %17 = load double, ptr %3, align 8, !tbaa !5
  %18 = fcmp ogt double %16, %17
  br i1 %18, label %19, label %28

19:                                               ; preds = %2
  %20 = getelementptr inbounds i8, ptr %0, i64 496
  %21 = load double, ptr %20, align 8, !tbaa !24
  %22 = getelementptr inbounds i8, ptr %0, i64 504
  %23 = load double, ptr %22, align 8, !tbaa !25
  %24 = getelementptr inbounds i8, ptr %0, i64 32
  %25 = load double, ptr %24, align 8, !tbaa !26
  %26 = fadd double %23, %25
  %27 = fcmp ogt double %21, %26
  br i1 %27, label %.sink.split, label %28

28:                                               ; preds = %19, %2
  %29 = fcmp olt double %16, %17
  br i1 %29, label %30, label %39

30:                                               ; preds = %28
  %31 = getelementptr inbounds i8, ptr %0, i64 496
  %32 = load double, ptr %31, align 8, !tbaa !24
  %33 = getelementptr inbounds i8, ptr %0, i64 32
  %34 = load double, ptr %33, align 8, !tbaa !26
  %35 = fadd double %32, %34
  %36 = getelementptr inbounds i8, ptr %0, i64 504
  %37 = load double, ptr %36, align 8, !tbaa !25
  %38 = fcmp olt double %35, %37
  br i1 %38, label %.sink.split, label %39

39:                                               ; preds = %30, %28
  br i1 %18, label %40, label %49

40:                                               ; preds = %39
  %41 = getelementptr inbounds i8, ptr %0, i64 496
  %42 = load double, ptr %41, align 8, !tbaa !24
  %43 = getelementptr inbounds i8, ptr %0, i64 32
  %44 = load double, ptr %43, align 8, !tbaa !26
  %45 = fadd double %42, %44
  %46 = getelementptr inbounds i8, ptr %0, i64 504
  %47 = load double, ptr %46, align 8, !tbaa !25
  %48 = fcmp olt double %45, %47
  br i1 %48, label %.sink.split, label %49

49:                                               ; preds = %40, %39
  br i1 %29, label %50, label %60

50:                                               ; preds = %49
  %51 = getelementptr inbounds i8, ptr %0, i64 496
  %52 = load double, ptr %51, align 8, !tbaa !24
  %53 = getelementptr inbounds i8, ptr %0, i64 504
  %54 = load double, ptr %53, align 8, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %0, i64 32
  %56 = load double, ptr %55, align 8, !tbaa !26
  %57 = fadd double %54, %56
  %58 = fcmp ogt double %52, %57
  br i1 %58, label %.sink.split, label %60

.sink.split:                                      ; preds = %50, %40, %30, %19
  %.sink = phi i32 [ 8, %19 ], [ 8, %30 ], [ 7, %40 ], [ 7, %50 ]
  %59 = getelementptr inbounds i8, ptr %0, i64 208
  store i32 %.sink, ptr %59, align 8, !tbaa !27
  br label %60

60:                                               ; preds = %.sink.split, %49, %50
  %61 = load double, ptr %0, align 8, !tbaa !28
  %62 = load double, ptr %8, align 8, !tbaa !21
  %63 = tail call double @rad(double noundef %1) #4
  %64 = tail call double @cos(double noundef %63) #4
  %65 = tail call double @llvm.fmuladd.f64(double %62, double %64, double %61)
  %66 = getelementptr inbounds i8, ptr %0, i64 64
  store double %65, ptr %66, align 8, !tbaa !29
  %67 = getelementptr inbounds i8, ptr %0, i64 8
  %68 = load double, ptr %67, align 8, !tbaa !30
  %69 = load double, ptr %8, align 8, !tbaa !21
  %70 = tail call double @rad(double noundef %1) #4
  %71 = tail call double @sin(double noundef %70) #4
  %72 = tail call double @llvm.fmuladd.f64(double %69, double %71, double %68)
  %73 = getelementptr inbounds i8, ptr %0, i64 72
  store double %72, ptr %73, align 8, !tbaa !31
  %74 = load double, ptr %8, align 8, !tbaa !21
  ret double %74
}

; Function Attrs: nounwind uwtable
declare hidden void @inc_smal_steps(ptr noundef, double noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden void @inc_big_steps(ptr noundef, double noundef) local_unnamed_addr #0

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

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

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = !{!6, !7, i64 512}
!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 520}
!21 = !{!6, !7, i64 40}
!22 = !{!6, !7, i64 24}
!23 = !{!6, !7, i64 48}
!24 = !{!6, !7, i64 496}
!25 = !{!6, !7, i64 504}
!26 = !{!6, !7, i64 32}
!27 = !{!6, !10, i64 208}
!28 = !{!6, !7, i64 0}
!29 = !{!6, !7, i64 64}
!30 = !{!6, !7, i64 8}
!31 = !{!6, !7, i64 72}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass