; LLVM IR from jovanlanik/wip :: dungeon.d/src (d_draw)

; 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.wip_obj_t = type { %union.anon.2, %union.anon.4, %union.anon.6 }
%union.anon.2 = type { [3 x float] }
%union.anon.4 = type { [3 x float] }
%union.anon.6 = type { [4 x float] }
%union.wip_globj_t = type { [16 x float] }
%struct.room_t = type { i32, i32, i32, ptr, ptr }
%struct.deco_t = type { i32, ptr }
%struct.anon.3 = type { float, float, float }

@drawRoom.init = external hidden global i32, align 4
@drawRoom.object = external hidden global [4 x %struct.wip_obj_t], align 16

; 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
declare dso_local void @drawModel(ptr noundef, ptr noundef, ptr noundef byval(%union.wip_globj_t) align 8, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @drawRoom(ptr noundef %0, ptr noundef byval(%union.wip_globj_t) align 8 %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [3 x float], align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %11 = load i32, ptr @drawRoom.init, align 4, !tbaa !9
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %41

13:                                               ; preds = %2
  store i32 1, ptr @drawRoom.init, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %37, %13
  %15 = load i32, ptr %4, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 4
  br i1 %16, label %18, label %17

17:                                               ; preds = %14
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  br label %40

18:                                               ; preds = %14
  %19 = load i32, ptr %4, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %20
  %22 = call ptr @wip_makeObject(ptr noundef %21)
  %23 = load i32, ptr %4, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %24
  %26 = getelementptr inbounds %struct.wip_obj_t, ptr %25, i32 0, i32 2
  %27 = getelementptr inbounds [4 x float], ptr %26, i64 0, i64 0
  %28 = load i32, ptr %4, align 4, !tbaa !9
  %29 = sitofp i32 %28 to double
  %30 = fmul double %29, 9.000000e+01
  %31 = fmul double %30, 0x400921FB54442D18
  %32 = fdiv double %31, 1.800000e+02
  %33 = fptrunc double %32 to float
  store float 0.000000e+00, ptr %5, align 4, !tbaa !11
  %34 = getelementptr inbounds float, ptr %5, i64 1
  store float 0.000000e+00, ptr %34, align 4, !tbaa !11
  %35 = getelementptr inbounds float, ptr %5, i64 2
  store float 1.000000e+00, ptr %35, align 4, !tbaa !11
  %36 = getelementptr inbounds [3 x float], ptr %5, i64 0, i64 0
  call void @quat_rotate(ptr noundef %27, float noundef %33, ptr noundef %36)
  br label %37

37:                                               ; preds = %18
  %38 = load i32, ptr %4, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %4, align 4, !tbaa !9
  br label %14, !llvm.loop !13

40:                                               ; preds = %17
  br label %41

41:                                               ; preds = %40, %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.room_t, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !15
  store i32 %44, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %176, %41
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.room_t, ptr %47, i32 0, i32 2
  %49 = load i32, ptr %48, align 8, !tbaa !17
  %50 = icmp ult i32 %46, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %45
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %179

52:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %172, %52
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = load ptr, ptr %3, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.room_t, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !18
  %58 = icmp ult i32 %54, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %53
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %175

60:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %168, %60
  %62 = load i32, ptr %10, align 4, !tbaa !9
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.room_t, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !15
  %66 = icmp ult i32 %62, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %61
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %171

68:                                               ; preds = %61
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.room_t, ptr %69, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !19
  %72 = load i32, ptr %7, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds ptr, ptr %71, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = load i32, ptr %9, align 4, !tbaa !9
  %78 = mul i32 %76, %77
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = add i32 %78, %79
  %81 = zext i32 %80 to i64
  %82 = getelementptr inbounds %struct.deco_t, ptr %75, i64 %81
  %83 = getelementptr inbounds %struct.deco_t, ptr %82, i32 0, i32 1
  %84 = load ptr, ptr %83, align 8, !tbaa !20
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %167

86:                                               ; preds = %68
  %87 = load i32, ptr %10, align 4, !tbaa !9
  %88 = mul nsw i32 2, %87
  %89 = sitofp i32 %88 to float
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.room_t, ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !9
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = mul i32 %97, %98
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = add i32 %99, %100
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds %struct.deco_t, ptr %96, i64 %102
  %104 = getelementptr inbounds %struct.deco_t, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 8, !tbaa !22
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %106
  %108 = getelementptr inbounds %struct.wip_obj_t, ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds %struct.anon.3, ptr %108, i32 0, i32 0
  store float %89, ptr %109, align 8, !tbaa !23
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = mul nsw i32 2, %110
  %112 = sitofp i32 %111 to float
  %113 = load ptr, ptr %3, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.room_t, ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !19
  %116 = load i32, ptr %7, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i32, ptr %6, align 4, !tbaa !9
  %121 = load i32, ptr %9, align 4, !tbaa !9
  %122 = mul i32 %120, %121
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = add i32 %122, %123
  %125 = zext i32 %124 to i64
  %126 = getelementptr inbounds %struct.deco_t, ptr %119, i64 %125
  %127 = getelementptr inbounds %struct.deco_t, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !22
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.wip_obj_t, ptr %130, i32 0, i32 0
  %132 = getelementptr inbounds %struct.anon.3, ptr %131, i32 0, i32 1
  store float %112, ptr %132, align 4, !tbaa !23
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.room_t, ptr %133, i32 0, i32 4
  %135 = load ptr, ptr %134, align 8, !tbaa !19
  %136 = load i32, ptr %7, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds ptr, ptr %135, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = load i32, ptr %6, align 4, !tbaa !9
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = mul i32 %140, %141
  %143 = load i32, ptr %10, align 4, !tbaa !9
  %144 = add i32 %142, %143
  %145 = zext i32 %144 to i64
  %146 = getelementptr inbounds %struct.deco_t, ptr %139, i64 %145
  %147 = getelementptr inbounds %struct.deco_t, ptr %146, i32 0, i32 0
  %148 = load i32, ptr %147, align 8, !tbaa !22
  %149 = zext i32 %148 to i64
  %150 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %149
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.room_t, ptr %151, i32 0, i32 4
  %153 = load ptr, ptr %152, align 8, !tbaa !19
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds ptr, ptr %153, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = load i32, ptr %6, align 4, !tbaa !9
  %159 = load i32, ptr %9, align 4, !tbaa !9
  %160 = mul i32 %158, %159
  %161 = load i32, ptr %10, align 4, !tbaa !9
  %162 = add i32 %160, %161
  %163 = zext i32 %162 to i64
  %164 = getelementptr inbounds %struct.deco_t, ptr %157, i64 %163
  %165 = getelementptr inbounds %struct.deco_t, ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !20
  call void @drawModel(ptr noundef %150, ptr noundef %166, ptr noundef byval(%union.wip_globj_t) align 8 %1, ptr noundef null)
  br label %167

167:                                              ; preds = %86, %68
  br label %168

168:                                              ; preds = %167
  %169 = load i32, ptr %10, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %10, align 4, !tbaa !9
  br label %61, !llvm.loop !24

171:                                              ; preds = %67
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %9, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %9, align 4, !tbaa !9
  br label %53, !llvm.loop !25

175:                                              ; preds = %59
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %7, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %7, align 4, !tbaa !9
  br label %45, !llvm.loop !26

179:                                              ; preds = %51
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  ret void
}

declare ptr @wip_makeObject(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @quat_rotate(ptr noundef, float noundef, ptr noundef) #3

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !10, i64 0}
!16 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!16, !10, i64 8}
!18 = !{!16, !10, i64 4}
!19 = !{!16, !6, i64 24}
!20 = !{!21, !6, i64 8}
!21 = !{!"", !10, i64 0, !6, i64 8}
!22 = !{!21, !10, i64 0}
!23 = !{!7, !7, i64 0}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}


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

%struct.wip_obj_t = type { %union.anon.2, %union.anon.4, %union.anon.6 }
%union.anon.2 = type { [3 x float] }
%union.anon.4 = type { [3 x float] }
%union.anon.6 = type { [4 x float] }
%union.wip_globj_t = type { [16 x float] }
%struct.deco_t = type { i32, ptr }

@drawRoom.init = external hidden local_unnamed_addr global i32, align 4
@drawRoom.object = external hidden global [4 x %struct.wip_obj_t], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @drawModel(ptr noundef, ptr noundef, ptr noundef byval(%union.wip_globj_t) align 8, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @drawRoom(ptr nocapture noundef readonly %0, ptr noundef byval(%union.wip_globj_t) align 8 %1) local_unnamed_addr #0 {
  %3 = alloca [3 x float], align 8
  %4 = load i32, ptr @drawRoom.init, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 0
  br i1 %5, label %.loopexit.loopexit, label %.loopexit

.loopexit.loopexit:                               ; preds = %2
  store i32 1, ptr @drawRoom.init, align 4, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %3, i64 8
  %7 = tail call ptr @wip_makeObject(ptr noundef nonnull @drawRoom.object) #3
  store <2 x float> zeroinitializer, ptr %3, align 8, !tbaa !9
  store float 1.000000e+00, ptr %6, align 8, !tbaa !9
  call void @quat_rotate(ptr noundef nonnull getelementptr inbounds (i8, ptr @drawRoom.object, i64 24), float noundef 0.000000e+00, ptr noundef nonnull %3)
  %8 = call ptr @wip_makeObject(ptr noundef nonnull getelementptr inbounds (i8, ptr @drawRoom.object, i64 40)) #3
  store <2 x float> zeroinitializer, ptr %3, align 8, !tbaa !9
  store float 1.000000e+00, ptr %6, align 8, !tbaa !9
  call void @quat_rotate(ptr noundef nonnull getelementptr inbounds (i8, ptr @drawRoom.object, i64 64), float noundef 0x3FF921FB60000000, ptr noundef nonnull %3)
  %9 = call ptr @wip_makeObject(ptr noundef nonnull getelementptr inbounds (i8, ptr @drawRoom.object, i64 80)) #3
  store <2 x float> zeroinitializer, ptr %3, align 8, !tbaa !9
  store float 1.000000e+00, ptr %6, align 8, !tbaa !9
  call void @quat_rotate(ptr noundef nonnull getelementptr inbounds (i8, ptr @drawRoom.object, i64 104), float noundef 0x400921FB60000000, ptr noundef nonnull %3)
  %10 = call ptr @wip_makeObject(ptr noundef nonnull getelementptr inbounds (i8, ptr @drawRoom.object, i64 120)) #3
  store <2 x float> zeroinitializer, ptr %3, align 8, !tbaa !9
  store float 1.000000e+00, ptr %6, align 8, !tbaa !9
  call void @quat_rotate(ptr noundef nonnull getelementptr inbounds (i8, ptr @drawRoom.object, i64 144), float noundef 0x4012D97C80000000, ptr noundef nonnull %3)
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %2
  %11 = load i32, ptr %0, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i32, ptr %12, align 8, !tbaa !14
  %.not51 = icmp eq i32 %13, 0
  br i1 %.not51, label %._crit_edge50, label %.preheader44.lr.ph

.preheader44.lr.ph:                               ; preds = %.loopexit
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load i32, ptr %14, align 4, !tbaa !15
  %.not52 = icmp eq i32 %16, 0
  br i1 %.not52, label %._crit_edge50, label %.preheader44

.preheader44:                                     ; preds = %.preheader44.lr.ph, %._crit_edge48
  %17 = phi i32 [ %29, %._crit_edge48 ], [ %13, %.preheader44.lr.ph ]
  %18 = phi i32 [ %30, %._crit_edge48 ], [ %16, %.preheader44.lr.ph ]
  %19 = phi i32 [ %31, %._crit_edge48 ], [ %11, %.preheader44.lr.ph ]
  %20 = phi i32 [ %32, %._crit_edge48 ], [ %11, %.preheader44.lr.ph ]
  %21 = phi i32 [ %33, %._crit_edge48 ], [ %11, %.preheader44.lr.ph ]
  %22 = phi i32 [ %34, %._crit_edge48 ], [ %16, %.preheader44.lr.ph ]
  %indvars.iv60 = phi i64 [ %indvars.iv.next61, %._crit_edge48 ], [ 0, %.preheader44.lr.ph ]
  %.not53 = icmp eq i32 %22, 0
  br i1 %.not53, label %._crit_edge48, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader44
  %.not54 = icmp eq i32 %21, 0
  br i1 %.not54, label %._crit_edge48, label %.preheader

._crit_edge50:                                    ; preds = %._crit_edge48, %.preheader44.lr.ph, %.loopexit
  ret void

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge
  %23 = phi i32 [ %37, %._crit_edge ], [ %18, %.preheader.lr.ph ]
  %24 = phi i32 [ %38, %._crit_edge ], [ %19, %.preheader.lr.ph ]
  %25 = phi i32 [ %39, %._crit_edge ], [ %20, %.preheader.lr.ph ]
  %.04147 = phi i32 [ %40, %._crit_edge ], [ 0, %.preheader.lr.ph ]
  %.not55 = icmp eq i32 %25, 0
  br i1 %.not55, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %26 = mul i32 %.04147, %11
  %27 = shl nuw nsw i32 %.04147, 1
  %28 = uitofp nneg i32 %27 to float
  br label %42

._crit_edge48.loopexit56:                         ; preds = %._crit_edge
  %.pre64 = load i32, ptr %12, align 8, !tbaa !14
  br label %._crit_edge48

._crit_edge48:                                    ; preds = %.preheader.lr.ph, %._crit_edge48.loopexit56, %.preheader44
  %29 = phi i32 [ %.pre64, %._crit_edge48.loopexit56 ], [ %17, %.preheader44 ], [ %17, %.preheader.lr.ph ]
  %30 = phi i32 [ %37, %._crit_edge48.loopexit56 ], [ %18, %.preheader44 ], [ %18, %.preheader.lr.ph ]
  %31 = phi i32 [ %38, %._crit_edge48.loopexit56 ], [ %19, %.preheader44 ], [ %19, %.preheader.lr.ph ]
  %32 = phi i32 [ %39, %._crit_edge48.loopexit56 ], [ %20, %.preheader44 ], [ %20, %.preheader.lr.ph ]
  %33 = phi i32 [ %39, %._crit_edge48.loopexit56 ], [ %21, %.preheader44 ], [ 0, %.preheader.lr.ph ]
  %34 = phi i32 [ %37, %._crit_edge48.loopexit56 ], [ 0, %.preheader44 ], [ %22, %.preheader.lr.ph ]
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %35 = zext i32 %29 to i64
  %36 = icmp ult i64 %indvars.iv.next61, %35
  br i1 %36, label %.preheader44, label %._crit_edge50, !llvm.loop !16

._crit_edge.loopexit:                             ; preds = %75
  %.pre63 = load i32, ptr %14, align 4, !tbaa !15
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %37 = phi i32 [ %.pre63, %._crit_edge.loopexit ], [ %23, %.preheader ]
  %38 = phi i32 [ %76, %._crit_edge.loopexit ], [ %24, %.preheader ]
  %39 = phi i32 [ %76, %._crit_edge.loopexit ], [ 0, %.preheader ]
  %40 = add nuw nsw i32 %.04147, 1
  %41 = icmp ult i32 %40, %37
  br i1 %41, label %.preheader, label %._crit_edge48.loopexit56, !llvm.loop !19

42:                                               ; preds = %.lr.ph, %75
  %43 = phi i32 [ %24, %.lr.ph ], [ %76, %75 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %75 ]
  %44 = load ptr, ptr %15, align 8, !tbaa !20
  %45 = getelementptr inbounds ptr, ptr %44, i64 %indvars.iv60
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = trunc nuw nsw i64 %indvars.iv to i32
  %48 = add i32 %26, %47
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds %struct.deco_t, ptr %46, i64 %49
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  %.not = icmp eq ptr %52, null
  br i1 %.not, label %75, label %53

53:                                               ; preds = %42
  %indvars.iv.tr = trunc i64 %indvars.iv to i32
  %54 = shl i32 %indvars.iv.tr, 1
  %55 = uitofp nneg i32 %54 to float
  %56 = load i32, ptr %50, align 8, !tbaa !24
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %57
  store float %55, ptr %58, align 8, !tbaa !25
  %59 = load ptr, ptr %15, align 8, !tbaa !20
  %60 = getelementptr inbounds ptr, ptr %59, i64 %indvars.iv60
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  %62 = getelementptr inbounds %struct.deco_t, ptr %61, i64 %49
  %63 = load i32, ptr %62, align 8, !tbaa !24
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %64, i32 0, i32 0, i64 1
  store float %28, ptr %65, align 4, !tbaa !25
  %66 = load ptr, ptr %15, align 8, !tbaa !20
  %67 = getelementptr inbounds ptr, ptr %66, i64 %indvars.iv60
  %68 = load ptr, ptr %67, align 8, !tbaa !21
  %69 = getelementptr inbounds %struct.deco_t, ptr %68, i64 %49
  %70 = load i32, ptr %69, align 8, !tbaa !24
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds [4 x %struct.wip_obj_t], ptr @drawRoom.object, i64 0, i64 %71
  %73 = getelementptr inbounds i8, ptr %69, i64 8
  %74 = load ptr, ptr %73, align 8, !tbaa !22
  call void @drawModel(ptr noundef nonnull %72, ptr noundef %74, ptr noundef nonnull byval(%union.wip_globj_t) align 8 %1, ptr noundef null)
  %.pre = load i32, ptr %0, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %42, %53
  %76 = phi i32 [ %43, %42 ], [ %.pre, %53 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %77 = zext i32 %76 to i64
  %78 = icmp ult i64 %indvars.iv.next, %77
  br i1 %78, label %42, label %._crit_edge.loopexit, !llvm.loop !26
}

declare ptr @wip_makeObject(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @quat_rotate(ptr noundef, float noundef, ptr noundef) local_unnamed_addr #2

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 = { inlinehint 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 #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !6, i64 4}
!16 = distinct !{!16, !17, !18}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.unswitch.partial.disable"}
!19 = distinct !{!19, !17, !18}
!20 = !{!12, !13, i64 24}
!21 = !{!13, !13, i64 0}
!22 = !{!23, !13, i64 8}
!23 = !{!"", !6, i64 0, !13, i64 8}
!24 = !{!23, !6, i64 0}
!25 = !{!7, !7, i64 0}
!26 = distinct !{!26, !17}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass