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

; 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_norme2 = type { i32, i32, i32, 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: nounwind uwtable
define dso_local void @dda_textures(ptr noundef %0, double noundef %1, double noundef %2, i32 noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.s_norme2, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  %10 = load i32, ptr %8, align 4, !tbaa !11
  %11 = icmp eq i32 %10, 20
  br i1 %11, label %12, label %16

12:                                               ; preds = %4
  %13 = load double, ptr %7, align 8, !tbaa !9
  %14 = fcmp olt double %13, 0.000000e+00
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  store double 0.000000e+00, ptr %7, align 8, !tbaa !9
  br label %16

16:                                               ; preds = %15, %12, %4
  %17 = phi i1 [ false, %12 ], [ false, %4 ], [ false, %15 ]
  %18 = zext i1 %17 to i32
  %19 = load i32, ptr %8, align 4, !tbaa !11
  %20 = icmp eq i32 %19, 19
  br i1 %20, label %21, label %25

21:                                               ; preds = %16
  %22 = load double, ptr %6, align 8, !tbaa !9
  %23 = fcmp olt double %22, 0.000000e+00
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  br label %25

25:                                               ; preds = %24, %21, %16
  %26 = phi i1 [ false, %21 ], [ false, %16 ], [ false, %24 ]
  %27 = zext i1 %26 to i32
  %28 = load i32, ptr %8, align 4, !tbaa !11
  %29 = icmp eq i32 %28, 19
  br i1 %29, label %30, label %34

30:                                               ; preds = %25
  %31 = load double, ptr %7, align 8, !tbaa !9
  %32 = fcmp ogt double %31, 1.000000e+03
  br i1 %32, label %33, label %34

33:                                               ; preds = %30
  store double 1.000000e+03, ptr %7, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %33, %30, %25
  %35 = phi i1 [ false, %30 ], [ false, %25 ], [ true, %33 ]
  %36 = zext i1 %35 to i32
  %37 = load i32, ptr %8, align 4, !tbaa !11
  %38 = icmp eq i32 %37, 21
  br i1 %38, label %39, label %43

39:                                               ; preds = %34
  %40 = load double, ptr %6, align 8, !tbaa !9
  %41 = fcmp ogt double %40, 1.000000e+03
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store double 1.000000e+03, ptr %6, align 8, !tbaa !9
  br label %43

43:                                               ; preds = %42, %39, %34
  %44 = phi i1 [ false, %39 ], [ false, %34 ], [ true, %42 ]
  %45 = zext i1 %44 to i32
  %46 = load double, ptr %6, align 8, !tbaa !9
  %47 = load double, ptr %7, align 8, !tbaa !9
  %48 = fsub double %46, %47
  %49 = call double @llvm.fabs.f64(double %48)
  %50 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 3
  store double %49, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 0
  store i32 -1, ptr %51, align 8, !tbaa !15
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.s_data, ptr %52, i32 0, i32 17
  %54 = getelementptr inbounds %struct.s_textures, ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 8, !tbaa !16
  %56 = icmp eq i32 %55, 8
  br i1 %56, label %57, label %78

57:                                               ; preds = %43
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.s_data, ptr %58, i32 0, i32 17
  %60 = getelementptr inbounds %struct.s_textures, ptr %59, i32 0, i32 18
  %61 = load i32, ptr %60, align 8, !tbaa !26
  %62 = sitofp i32 %61 to double
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.s_data, ptr %63, i32 0, i32 9
  %65 = load double, ptr %64, align 8, !tbaa !27
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.s_data, ptr %66, i32 0, i32 2
  %68 = load double, ptr %67, align 8, !tbaa !28
  %69 = call double @fmod(double noundef %65, double noundef %68) #5
  %70 = fmul double %62, %69
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.s_data, ptr %71, i32 0, i32 2
  %73 = load double, ptr %72, align 8, !tbaa !28
  %74 = fdiv double %70, %73
  %75 = fptosi double %74 to i32
  %76 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 1
  store i32 %75, ptr %76, align 4, !tbaa !29
  %77 = icmp ne i32 %75, 0
  br label %78

78:                                               ; preds = %57, %43
  %79 = phi i1 [ false, %43 ], [ %77, %57 ]
  %80 = zext i1 %79 to i32
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.s_data, ptr %81, i32 0, i32 17
  %83 = getelementptr inbounds %struct.s_textures, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !16
  %85 = icmp eq i32 %84, 7
  br i1 %85, label %86, label %107

86:                                               ; preds = %78
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.s_data, ptr %87, i32 0, i32 17
  %89 = getelementptr inbounds %struct.s_textures, ptr %88, i32 0, i32 18
  %90 = load i32, ptr %89, align 8, !tbaa !26
  %91 = sitofp i32 %90 to double
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.s_data, ptr %92, i32 0, i32 8
  %94 = load double, ptr %93, align 8, !tbaa !30
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.s_data, ptr %95, i32 0, i32 2
  %97 = load double, ptr %96, align 8, !tbaa !28
  %98 = call double @fmod(double noundef %94, double noundef %97) #5
  %99 = fmul double %91, %98
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.s_data, ptr %100, i32 0, i32 2
  %102 = load double, ptr %101, align 8, !tbaa !28
  %103 = fdiv double %99, %102
  %104 = fptosi double %103 to i32
  %105 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 1
  store i32 %104, ptr %105, align 4, !tbaa !29
  %106 = icmp ne i32 %104, 0
  br label %107

107:                                              ; preds = %86, %78
  %108 = phi i1 [ false, %78 ], [ %106, %86 ]
  %109 = zext i1 %108 to i32
  %110 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !29
  %112 = icmp slt i32 %111, 0
  br i1 %112, label %113, label %115

113:                                              ; preds = %107
  %114 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 1
  store i32 0, ptr %114, align 4, !tbaa !29
  br label %115

115:                                              ; preds = %113, %107
  %116 = phi i1 [ false, %107 ], [ false, %113 ]
  %117 = zext i1 %116 to i32
  %118 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 1
  %119 = load i32, ptr %118, align 4, !tbaa !29
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.s_data, ptr %120, i32 0, i32 17
  %122 = getelementptr inbounds %struct.s_textures, ptr %121, i32 0, i32 18
  %123 = load i32, ptr %122, align 8, !tbaa !26
  %124 = icmp sgt i32 %119, %123
  br i1 %124, label %125, label %132

125:                                              ; preds = %115
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.s_data, ptr %126, i32 0, i32 17
  %128 = getelementptr inbounds %struct.s_textures, ptr %127, i32 0, i32 18
  %129 = load i32, ptr %128, align 8, !tbaa !26
  %130 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 1
  store i32 %129, ptr %130, align 4, !tbaa !29
  %131 = icmp ne i32 %129, 0
  br label %132

132:                                              ; preds = %125, %115
  %133 = phi i1 [ false, %115 ], [ %131, %125 ]
  %134 = zext i1 %133 to i32
  br label %135

135:                                              ; preds = %270, %132
  %136 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 0
  %137 = load i32, ptr %136, align 8, !tbaa !15
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %136, align 8, !tbaa !15
  %139 = sitofp i32 %138 to double
  %140 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 3
  %141 = load double, ptr %140, align 8, !tbaa !13
  %142 = fcmp olt double %139, %141
  br i1 %142, label %143, label %273

143:                                              ; preds = %135
  %144 = load ptr, ptr %5, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.s_data, ptr %144, i32 0, i32 17
  %146 = getelementptr inbounds %struct.s_textures, ptr %145, i32 0, i32 19
  %147 = load i32, ptr %146, align 4, !tbaa !31
  %148 = sitofp i32 %147 to double
  %149 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 0
  %150 = load i32, ptr %149, align 8, !tbaa !15
  %151 = sitofp i32 %150 to double
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.s_data, ptr %152, i32 0, i32 12
  %154 = load double, ptr %153, align 8, !tbaa !32
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.s_data, ptr %155, i32 0, i32 11
  %157 = load double, ptr %156, align 8, !tbaa !33
  %158 = fsub double %154, %157
  %159 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 3
  %160 = load double, ptr %159, align 8, !tbaa !13
  %161 = fsub double %158, %160
  %162 = call double @llvm.fabs.f64(double %161)
  %163 = fdiv double %162, 2.000000e+00
  %164 = fadd double %151, %163
  %165 = fmul double %148, %164
  %166 = load ptr, ptr %5, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.s_data, ptr %166, i32 0, i32 12
  %168 = load double, ptr %167, align 8, !tbaa !32
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.s_data, ptr %169, i32 0, i32 11
  %171 = load double, ptr %170, align 8, !tbaa !33
  %172 = fsub double %168, %171
  %173 = call double @llvm.fabs.f64(double %172)
  %174 = fdiv double %165, %173
  %175 = fptosi double %174 to i32
  %176 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 2
  store i32 %175, ptr %176, align 8, !tbaa !34
  %177 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 2
  %178 = load i32, ptr %177, align 8, !tbaa !34
  %179 = icmp slt i32 %178, 0
  br i1 %179, label %180, label %182

180:                                              ; preds = %143
  %181 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 2
  store i32 0, ptr %181, align 8, !tbaa !34
  br label %182

182:                                              ; preds = %180, %143
  %183 = phi i1 [ false, %143 ], [ false, %180 ]
  %184 = zext i1 %183 to i32
  %185 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 2
  %186 = load i32, ptr %185, align 8, !tbaa !34
  %187 = load ptr, ptr %5, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.s_data, ptr %187, i32 0, i32 17
  %189 = getelementptr inbounds %struct.s_textures, ptr %188, i32 0, i32 19
  %190 = load i32, ptr %189, align 4, !tbaa !31
  %191 = icmp sgt i32 %186, %190
  br i1 %191, label %192, label %199

192:                                              ; preds = %182
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.s_data, ptr %193, i32 0, i32 17
  %195 = getelementptr inbounds %struct.s_textures, ptr %194, i32 0, i32 19
  %196 = load i32, ptr %195, align 4, !tbaa !31
  %197 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 2
  store i32 %196, ptr %197, align 8, !tbaa !34
  %198 = icmp ne i32 %196, 0
  br label %199

199:                                              ; preds = %192, %182
  %200 = phi i1 [ false, %182 ], [ %198, %192 ]
  %201 = zext i1 %200 to i32
  %202 = load i32, ptr %8, align 4, !tbaa !11
  %203 = icmp eq i32 %202, 19
  br i1 %203, label %204, label %232

204:                                              ; preds = %199
  %205 = load ptr, ptr %5, align 8, !tbaa !5
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.s_data, ptr %206, i32 0, i32 10
  %208 = load i32, ptr %207, align 8, !tbaa !35
  %209 = load double, ptr %6, align 8, !tbaa !9
  %210 = fadd double %209, 1.000000e+00
  store double %210, ptr %6, align 8, !tbaa !9
  %211 = fptosi double %209 to i32
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.s_data, ptr %212, i32 0, i32 17
  %214 = getelementptr inbounds %struct.s_textures, ptr %213, i32 0, i32 17
  %215 = load ptr, ptr %214, align 8, !tbaa !36
  %216 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 2
  %217 = load i32, ptr %216, align 8, !tbaa !34
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.s_data, ptr %218, i32 0, i32 17
  %220 = getelementptr inbounds %struct.s_textures, ptr %219, i32 0, i32 20
  %221 = load i32, ptr %220, align 8, !tbaa !37
  %222 = sdiv i32 %221, 4
  %223 = mul nsw i32 %217, %222
  %224 = getelementptr inbounds %struct.s_norme2, ptr %9, i32 0, i32 1
  %225 = load i32, ptr %224, align 4, !tbaa !29
  %226 = add nsw i32 %223, %225
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds i32, ptr %215, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !11
  %230 = call i32 @my_pixel_put(ptr noundef %205, i32 noundef %208, i32 noundef %211, i32 noundef %229)
  %231 = icmp ne i32 %230, 0
  br label %232

232:                                              ; preds = %204, %199
  %233 = phi i1 [ false, %199 ], [ %231, %204 ]
  %234 = zext i1 %233 to i32
  %235 = load i32, ptr %8, align 4, !tbaa !11
  %236 = icmp eq i32 %235, 20
  br i1 %236, label %237, label %251

237:                                              ; preds = %232
  %238 = load ptr, ptr %5, align 8, !tbaa !5
  %239 = load ptr, ptr %5, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.s_data, ptr %239, i32 0, i32 10
  %241 = load i32, ptr %240, align 8, !tbaa !35
  %242 = load double, ptr %6, align 8, !tbaa !9
  %243 = fadd double %242, 1.000000e+00
  store double %243, ptr %6, align 8, !tbaa !9
  %244 = fptosi double %242 to i32
  %245 = load ptr, ptr %5, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.s_data, ptr %245, i32 0, i32 19
  %247 = getelementptr inbounds %struct.s_map_result, ptr %246, i32 0, i32 1
  %248 = load i32, ptr %247, align 4, !tbaa !38
  %249 = call i32 @my_pixel_put(ptr noundef %238, i32 noundef %241, i32 noundef %244, i32 noundef %248)
  %250 = icmp ne i32 %249, 0
  br label %251

251:                                              ; preds = %237, %232
  %252 = phi i1 [ false, %232 ], [ %250, %237 ]
  %253 = zext i1 %252 to i32
  %254 = load i32, ptr %8, align 4, !tbaa !11
  %255 = icmp eq i32 %254, 21
  br i1 %255, label %256, label %270

256:                                              ; preds = %251
  %257 = load ptr, ptr %5, align 8, !tbaa !5
  %258 = load ptr, ptr %5, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.s_data, ptr %258, i32 0, i32 10
  %260 = load i32, ptr %259, align 8, !tbaa !35
  %261 = load double, ptr %6, align 8, !tbaa !9
  %262 = fadd double %261, 1.000000e+00
  store double %262, ptr %6, align 8, !tbaa !9
  %263 = fptosi double %261 to i32
  %264 = load ptr, ptr %5, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.s_data, ptr %264, i32 0, i32 19
  %266 = getelementptr inbounds %struct.s_map_result, ptr %265, i32 0, i32 0
  %267 = load i32, ptr %266, align 8, !tbaa !39
  %268 = call i32 @my_pixel_put(ptr noundef %257, i32 noundef %260, i32 noundef %263, i32 noundef %267)
  %269 = icmp ne i32 %268, 0
  br label %270

270:                                              ; preds = %256, %251
  %271 = phi i1 [ false, %251 ], [ %269, %256 ]
  %272 = zext i1 %271 to i32
  br label %135, !llvm.loop !40

273:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  ret void
}

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

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

declare i32 @my_pixel_put(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

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

!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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !10, i64 16}
!14 = !{!"s_norme2", !12, i64 0, !12, i64 4, !12, i64 8, !10, i64 16}
!15 = !{!14, !12, i64 0}
!16 = !{!17, !12, i64 208}
!17 = !{!"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, !12, i64 80, !10, i64 88, !10, i64 96, !6, i64 104, !18, i64 112, !19, i64 144, !20, i64 184, !21, i64 208, !22, i64 336, !23, i64 376, !24, i64 456, !25, i64 528, !6, i64 584}
!18 = !{!"s_sprites", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28}
!19 = !{!"s_minimap", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!20 = !{!"s_door", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!21 = !{!"s_textures", !12, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !12, i64 48, !6, i64 56, !12, i64 64, !12, i64 68, !12, i64 72, !6, i64 80, !12, i64 88, !12, i64 92, !12, i64 96, !6, i64 104, !12, i64 112, !12, i64 116, !12, i64 120}
!22 = !{!"s_hook", !10, i64 0, !12, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!23 = !{!"s_map_result", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !7, i64 72}
!24 = !{!"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}
!25 = !{!"s_mlx", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !12, i64 48}
!26 = !{!17, !12, i64 320}
!27 = !{!17, !10, i64 72}
!28 = !{!17, !10, i64 16}
!29 = !{!14, !12, i64 4}
!30 = !{!17, !10, i64 64}
!31 = !{!17, !12, i64 324}
!32 = !{!17, !10, i64 96}
!33 = !{!17, !10, i64 88}
!34 = !{!14, !12, i64 8}
!35 = !{!17, !12, i64 80}
!36 = !{!17, !6, i64 312}
!37 = !{!17, !12, i64 328}
!38 = !{!17, !12, i64 380}
!39 = !{!17, !12, i64 376}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind uwtable
define dso_local void @dda_textures(ptr noundef %0, double noundef %1, double noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = icmp eq i32 %3, 20
  %6 = fcmp olt double %2, 0.000000e+00
  %or.cond = and i1 %6, %5
  %spec.store.select = select i1 %or.cond, double 0.000000e+00, double %2
  %7 = icmp eq i32 %3, 19
  %8 = fcmp olt double %1, 0.000000e+00
  %or.cond3 = and i1 %8, %7
  %spec.store.select9 = select i1 %or.cond3, double 0.000000e+00, double %1
  %9 = fcmp ogt double %spec.store.select, 1.000000e+03
  %or.cond5 = and i1 %7, %9
  %spec.store.select8 = select i1 %or.cond5, double 1.000000e+03, double %spec.store.select
  %10 = icmp eq i32 %3, 21
  %11 = fcmp ogt double %spec.store.select9, 1.000000e+03
  %or.cond7 = and i1 %10, %11
  %spec.store.select10 = select i1 %or.cond7, double 1.000000e+03, double %spec.store.select9
  %12 = fsub double %spec.store.select10, %spec.store.select8
  %13 = tail call double @llvm.fabs.f64(double %12)
  %14 = getelementptr inbounds i8, ptr %0, i64 208
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = icmp eq i32 %15, 8
  br i1 %16, label %17, label %30

17:                                               ; preds = %4
  %18 = getelementptr inbounds i8, ptr %0, i64 320
  %19 = load i32, ptr %18, align 8, !tbaa !20
  %20 = sitofp i32 %19 to double
  %21 = getelementptr inbounds i8, ptr %0, i64 72
  %22 = load double, ptr %21, align 8, !tbaa !21
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = load double, ptr %23, align 8, !tbaa !22
  %25 = tail call double @fmod(double noundef %22, double noundef %24) #5
  %26 = fmul double %25, %20
  %27 = load double, ptr %23, align 8, !tbaa !22
  %28 = fdiv double %26, %27
  %29 = fptosi double %28 to i32
  %.pr = load i32, ptr %14, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %17, %4
  %31 = phi i32 [ %.pr, %17 ], [ %15, %4 ]
  %.sroa.6.0 = phi i32 [ %29, %17 ], [ undef, %4 ]
  %32 = icmp eq i32 %31, 7
  br i1 %32, label %33, label %46

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %0, i64 320
  %35 = load i32, ptr %34, align 8, !tbaa !20
  %36 = sitofp i32 %35 to double
  %37 = getelementptr inbounds i8, ptr %0, i64 64
  %38 = load double, ptr %37, align 8, !tbaa !23
  %39 = getelementptr inbounds i8, ptr %0, i64 16
  %40 = load double, ptr %39, align 8, !tbaa !22
  %41 = tail call double @fmod(double noundef %38, double noundef %40) #5
  %42 = fmul double %41, %36
  %43 = load double, ptr %39, align 8, !tbaa !22
  %44 = fdiv double %42, %43
  %45 = fptosi double %44 to i32
  br label %46

46:                                               ; preds = %33, %30
  %.sroa.6.1 = phi i32 [ %45, %33 ], [ %.sroa.6.0, %30 ]
  %spec.select = tail call i32 @llvm.smax.i32(i32 %.sroa.6.1, i32 0)
  %47 = getelementptr inbounds i8, ptr %0, i64 320
  %48 = load i32, ptr %47, align 8, !tbaa !20
  %.sroa.6.3 = tail call i32 @llvm.smin.i32(i32 %spec.select, i32 %48)
  %49 = fcmp ueq double %12, 0.000000e+00
  br i1 %49, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %46
  %50 = getelementptr inbounds i8, ptr %0, i64 80
  %51 = getelementptr inbounds i8, ptr %0, i64 376
  %52 = getelementptr inbounds i8, ptr %0, i64 380
  %53 = getelementptr inbounds i8, ptr %0, i64 324
  %54 = getelementptr inbounds i8, ptr %0, i64 96
  %55 = getelementptr inbounds i8, ptr %0, i64 88
  %56 = getelementptr inbounds i8, ptr %0, i64 312
  %57 = getelementptr inbounds i8, ptr %0, i64 328
  br i1 %7, label %.thread.us, label %.lr.ph.split

.thread.us:                                       ; preds = %.lr.ph, %.thread.us
  %58 = phi double [ %86, %.thread.us ], [ 0.000000e+00, %.lr.ph ]
  %59 = phi i32 [ %85, %.thread.us ], [ 0, %.lr.ph ]
  %.071.us = phi double [ %74, %.thread.us ], [ %spec.store.select10, %.lr.ph ]
  %60 = load i32, ptr %53, align 4, !tbaa !24
  %61 = load double, ptr %54, align 8, !tbaa !25
  %62 = load double, ptr %55, align 8, !tbaa !26
  %63 = fsub double %61, %62
  %64 = fsub double %63, %13
  %65 = tail call double @llvm.fabs.f64(double %64)
  %66 = fmul double %65, 5.000000e-01
  %67 = fadd double %58, %66
  %68 = sitofp i32 %60 to double
  %69 = fmul double %67, %68
  %70 = tail call double @llvm.fabs.f64(double %63)
  %71 = fdiv double %69, %70
  %72 = fptosi double %71 to i32
  %spec.select67.us = tail call i32 @llvm.smax.i32(i32 %72, i32 0)
  %.sroa.13.1.us = tail call i32 @llvm.smin.i32(i32 %spec.select67.us, i32 %60)
  %73 = load i32, ptr %50, align 8, !tbaa !27
  %74 = fadd double %.071.us, 1.000000e+00
  %75 = fptosi double %.071.us to i32
  %76 = load ptr, ptr %56, align 8, !tbaa !28
  %77 = load i32, ptr %57, align 8, !tbaa !29
  %78 = sdiv i32 %77, 4
  %79 = mul nsw i32 %.sroa.13.1.us, %78
  %80 = add nsw i32 %79, %.sroa.6.3
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds i32, ptr %76, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !30
  %84 = tail call i32 @my_pixel_put(ptr noundef nonnull %0, i32 noundef %73, i32 noundef %75, i32 noundef %83) #5
  %85 = add nuw nsw i32 %59, 1
  %86 = uitofp nneg i32 %85 to double
  %87 = fcmp ogt double %13, %86
  br i1 %87, label %.thread.us, label %._crit_edge, !llvm.loop !31

.lr.ph.split:                                     ; preds = %.lr.ph
  br i1 %5, label %.thread69.us73, label %.lr.ph.split.split

.thread69.us73:                                   ; preds = %.lr.ph.split, %.thread69.us73
  %88 = phi i32 [ %94, %.thread69.us73 ], [ 0, %.lr.ph.split ]
  %.071.us72 = phi double [ %90, %.thread69.us73 ], [ %spec.store.select10, %.lr.ph.split ]
  %89 = load i32, ptr %50, align 8, !tbaa !27
  %90 = fadd double %.071.us72, 1.000000e+00
  %91 = fptosi double %.071.us72 to i32
  %92 = load i32, ptr %52, align 4, !tbaa !33
  %93 = tail call i32 @my_pixel_put(ptr noundef nonnull %0, i32 noundef %89, i32 noundef %91, i32 noundef %92) #5
  %94 = add nuw nsw i32 %88, 1
  %95 = uitofp nneg i32 %94 to double
  %96 = fcmp ogt double %13, %95
  br i1 %96, label %.thread69.us73, label %._crit_edge, !llvm.loop !31

.lr.ph.split.split:                               ; preds = %.lr.ph.split
  br i1 %10, label %.thread69.us76, label %._crit_edge

.thread69.us76:                                   ; preds = %.lr.ph.split.split, %.thread69.us76
  %97 = phi i32 [ %103, %.thread69.us76 ], [ 0, %.lr.ph.split.split ]
  %.071.us75 = phi double [ %99, %.thread69.us76 ], [ %spec.store.select10, %.lr.ph.split.split ]
  %98 = load i32, ptr %50, align 8, !tbaa !27
  %99 = fadd double %.071.us75, 1.000000e+00
  %100 = fptosi double %.071.us75 to i32
  %101 = load i32, ptr %51, align 8, !tbaa !34
  %102 = tail call i32 @my_pixel_put(ptr noundef nonnull %0, i32 noundef %98, i32 noundef %100, i32 noundef %101) #5
  %103 = add nuw nsw i32 %97, 1
  %104 = uitofp nneg i32 %103 to double
  %105 = fcmp ogt double %13, %104
  br i1 %105, label %.thread69.us76, label %._crit_edge, !llvm.loop !31

._crit_edge:                                      ; preds = %.thread69.us76, %.thread69.us73, %.thread.us, %.lr.ph.split.split, %46
  ret void
}

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

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

declare i32 @my_pixel_put(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { "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, !10, i64 208}
!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, !10, i64 320}
!21 = !{!6, !7, i64 72}
!22 = !{!6, !7, i64 16}
!23 = !{!6, !7, i64 64}
!24 = !{!6, !10, i64 324}
!25 = !{!6, !7, i64 96}
!26 = !{!6, !7, i64 88}
!27 = !{!6, !10, i64 80}
!28 = !{!6, !11, i64 312}
!29 = !{!6, !10, i64 328}
!30 = !{!10, !10, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!6, !10, i64 380}
!34 = !{!6, !10, i64 376}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass