; LLVM IR from Stephane-D/SGDK :: sample/bitmap/cube-3D/src (main)

; 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.Transformation3D = type { i16, ptr, ptr, %struct.Mat3D_f16, %struct.Mat3D_f16, %struct.Vect3D_f16, %struct.Vect3D_f16 }
%struct.Mat3D_f16 = type { %struct.Vect3D_f16, %struct.Vect3D_f16, %struct.Vect3D_f16 }
%struct.Vect3D_f16 = type { i16, i16, i16 }
%struct.Vect2D_s16 = type { i16, i16 }
%struct.Line = type { %struct.Vect2D_s16, %struct.Vect2D_s16, i16 }

@pts_2D = external dso_local global ptr, align 8
@transformation = external dso_local global %struct.Transformation3D, align 8
@flatDrawing = external dso_local global i16, align 2
@cube_face_norm = external constant [6 x %struct.Vect3D_f16], align 16
@cube_poly_ind = external constant [24 x i16], align 16
@cube_line_ind = external constant [24 x i16], 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: nounwind uwtable
define dso_local void @drawPoints(i8 noundef zeroext %0) #1 {
  %2 = alloca i8, align 1
  %3 = alloca [4 x %struct.Vect2D_s16], align 16
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i16, align 2
  %7 = alloca ptr, align 8
  %8 = alloca i16, align 2
  %9 = alloca i8, align 1
  %10 = alloca %struct.Line, align 2
  %11 = alloca ptr, align 8
  %12 = alloca i16, align 2
  store i8 %0, ptr %2, align 1, !tbaa !5
  %13 = load i16, ptr @flatDrawing, align 2, !tbaa !8
  %14 = icmp ne i16 %13, 0
  br i1 %14, label %15, label %97

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #4
  store ptr @cube_face_norm, ptr %4, align 8, !tbaa !10
  store ptr @cube_poly_ind, ptr %5, align 8, !tbaa !10
  store i16 6, ptr %6, align 2, !tbaa !8
  br label %16

16:                                               ; preds = %95, %15
  %17 = load i16, ptr %6, align 2, !tbaa !8
  %18 = add i16 %17, -1
  store i16 %18, ptr %6, align 2, !tbaa !8
  %19 = icmp ne i16 %17, 0
  br i1 %19, label %20, label %96

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %21 = getelementptr inbounds [4 x %struct.Vect2D_s16], ptr %3, i64 0, i64 0
  store ptr %21, ptr %7, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #4
  store i8 2, ptr %9, align 1, !tbaa !5
  %22 = load ptr, ptr %7, align 8, !tbaa !10
  %23 = getelementptr inbounds %struct.Vect2D_s16, ptr %22, i32 1
  store ptr %23, ptr %7, align 8, !tbaa !10
  %24 = load ptr, ptr @pts_2D, align 8, !tbaa !10
  %25 = load ptr, ptr %5, align 8, !tbaa !10
  %26 = getelementptr inbounds i16, ptr %25, i32 1
  store ptr %26, ptr %5, align 8, !tbaa !10
  %27 = load i16, ptr %25, align 2, !tbaa !8
  %28 = zext i16 %27 to i64
  %29 = getelementptr inbounds %struct.Vect2D_s16, ptr %24, i64 %28
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %22, ptr align 2 %29, i64 4, i1 false), !tbaa.struct !12
  %30 = load ptr, ptr %7, align 8, !tbaa !10
  %31 = getelementptr inbounds %struct.Vect2D_s16, ptr %30, i32 1
  store ptr %31, ptr %7, align 8, !tbaa !10
  %32 = load ptr, ptr @pts_2D, align 8, !tbaa !10
  %33 = load ptr, ptr %5, align 8, !tbaa !10
  %34 = getelementptr inbounds i16, ptr %33, i32 1
  store ptr %34, ptr %5, align 8, !tbaa !10
  %35 = load i16, ptr %33, align 2, !tbaa !8
  %36 = zext i16 %35 to i64
  %37 = getelementptr inbounds %struct.Vect2D_s16, ptr %32, i64 %36
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %30, ptr align 2 %37, i64 4, i1 false), !tbaa.struct !12
  %38 = load ptr, ptr %7, align 8, !tbaa !10
  %39 = getelementptr inbounds %struct.Vect2D_s16, ptr %38, i32 1
  store ptr %39, ptr %7, align 8, !tbaa !10
  %40 = load ptr, ptr @pts_2D, align 8, !tbaa !10
  %41 = load ptr, ptr %5, align 8, !tbaa !10
  %42 = getelementptr inbounds i16, ptr %41, i32 1
  store ptr %42, ptr %5, align 8, !tbaa !10
  %43 = load i16, ptr %41, align 2, !tbaa !8
  %44 = zext i16 %43 to i64
  %45 = getelementptr inbounds %struct.Vect2D_s16, ptr %40, i64 %44
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %38, ptr align 2 %45, i64 4, i1 false), !tbaa.struct !12
  %46 = load ptr, ptr %7, align 8, !tbaa !10
  %47 = load ptr, ptr @pts_2D, align 8, !tbaa !10
  %48 = load ptr, ptr %5, align 8, !tbaa !10
  %49 = getelementptr inbounds i16, ptr %48, i32 1
  store ptr %49, ptr %5, align 8, !tbaa !10
  %50 = load i16, ptr %48, align 2, !tbaa !8
  %51 = zext i16 %50 to i64
  %52 = getelementptr inbounds %struct.Vect2D_s16, ptr %47, i64 %51
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %46, ptr align 2 %52, i64 4, i1 false), !tbaa.struct !12
  %53 = load i16, ptr getelementptr inbounds (%struct.Transformation3D, ptr @transformation, i32 0, i32 6), align 2, !tbaa !13
  %54 = load ptr, ptr %4, align 8, !tbaa !10
  %55 = getelementptr inbounds %struct.Vect3D_f16, ptr %54, i32 0, i32 0
  %56 = load i16, ptr %55, align 2, !tbaa !17
  %57 = call signext i16 @F16_mul(i16 noundef signext %53, i16 noundef signext %56)
  %58 = sext i16 %57 to i32
  %59 = load i16, ptr getelementptr inbounds (%struct.Vect3D_f16, ptr getelementptr inbounds (%struct.Transformation3D, ptr @transformation, i32 0, i32 6), i32 0, i32 1), align 2, !tbaa !18
  %60 = load ptr, ptr %4, align 8, !tbaa !10
  %61 = getelementptr inbounds %struct.Vect3D_f16, ptr %60, i32 0, i32 1
  %62 = load i16, ptr %61, align 2, !tbaa !19
  %63 = call signext i16 @F16_mul(i16 noundef signext %59, i16 noundef signext %62)
  %64 = sext i16 %63 to i32
  %65 = add nsw i32 %58, %64
  %66 = load i16, ptr getelementptr inbounds (%struct.Vect3D_f16, ptr getelementptr inbounds (%struct.Transformation3D, ptr @transformation, i32 0, i32 6), i32 0, i32 2), align 2, !tbaa !20
  %67 = load ptr, ptr %4, align 8, !tbaa !10
  %68 = getelementptr inbounds %struct.Vect3D_f16, ptr %67, i32 0, i32 2
  %69 = load i16, ptr %68, align 2, !tbaa !21
  %70 = call signext i16 @F16_mul(i16 noundef signext %66, i16 noundef signext %69)
  %71 = sext i16 %70 to i32
  %72 = add nsw i32 %65, %71
  %73 = trunc i32 %72 to i16
  store i16 %73, ptr %8, align 2, !tbaa !8
  %74 = load ptr, ptr %4, align 8, !tbaa !10
  %75 = getelementptr inbounds %struct.Vect3D_f16, ptr %74, i32 1
  store ptr %75, ptr %4, align 8, !tbaa !10
  %76 = load i16, ptr %8, align 2, !tbaa !8
  %77 = sext i16 %76 to i32
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %87

79:                                               ; preds = %20
  %80 = load i16, ptr %8, align 2, !tbaa !8
  %81 = sext i16 %80 to i32
  %82 = ashr i32 %81, 4
  %83 = load i8, ptr %9, align 1, !tbaa !5
  %84 = zext i8 %83 to i32
  %85 = add nsw i32 %84, %82
  %86 = trunc i32 %85 to i8
  store i8 %86, ptr %9, align 1, !tbaa !5
  br label %87

87:                                               ; preds = %79, %20
  %88 = getelementptr inbounds [4 x %struct.Vect2D_s16], ptr %3, i64 0, i64 0
  %89 = call zeroext i16 @BMP_isPolygonCulled(ptr noundef %88, i16 noundef zeroext 4)
  %90 = icmp ne i16 %89, 0
  br i1 %90, label %95, label %91

91:                                               ; preds = %87
  %92 = getelementptr inbounds [4 x %struct.Vect2D_s16], ptr %3, i64 0, i64 0
  %93 = load i8, ptr %9, align 1, !tbaa !5
  %94 = call zeroext i16 @BMP_drawPolygon(ptr noundef %92, i16 noundef zeroext 4, i8 noundef zeroext %93)
  br label %95

95:                                               ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %16, !llvm.loop !22

96:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #4
  br label %125

97:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 10, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr %12) #4
  %98 = load i8, ptr %2, align 1, !tbaa !5
  %99 = zext i8 %98 to i16
  %100 = getelementptr inbounds %struct.Line, ptr %10, i32 0, i32 2
  store i16 %99, ptr %100, align 2, !tbaa !24
  store ptr @cube_line_ind, ptr %11, align 8, !tbaa !10
  store i16 12, ptr %12, align 2, !tbaa !8
  br label %101

101:                                              ; preds = %123, %97
  %102 = load i16, ptr %12, align 2, !tbaa !8
  %103 = add i16 %102, -1
  store i16 %103, ptr %12, align 2, !tbaa !8
  %104 = icmp ne i16 %102, 0
  br i1 %104, label %105, label %124

105:                                              ; preds = %101
  %106 = getelementptr inbounds %struct.Line, ptr %10, i32 0, i32 0
  %107 = load ptr, ptr @pts_2D, align 8, !tbaa !10
  %108 = load ptr, ptr %11, align 8, !tbaa !10
  %109 = getelementptr inbounds i16, ptr %108, i32 1
  store ptr %109, ptr %11, align 8, !tbaa !10
  %110 = load i16, ptr %108, align 2, !tbaa !8
  %111 = zext i16 %110 to i64
  %112 = getelementptr inbounds %struct.Vect2D_s16, ptr %107, i64 %111
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %106, ptr align 2 %112, i64 4, i1 false), !tbaa.struct !12
  %113 = getelementptr inbounds %struct.Line, ptr %10, i32 0, i32 1
  %114 = load ptr, ptr @pts_2D, align 8, !tbaa !10
  %115 = load ptr, ptr %11, align 8, !tbaa !10
  %116 = getelementptr inbounds i16, ptr %115, i32 1
  store ptr %116, ptr %11, align 8, !tbaa !10
  %117 = load i16, ptr %115, align 2, !tbaa !8
  %118 = zext i16 %117 to i64
  %119 = getelementptr inbounds %struct.Vect2D_s16, ptr %114, i64 %118
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %113, ptr align 2 %119, i64 4, i1 false), !tbaa.struct !12
  %120 = call zeroext i16 @BMP_clipLine(ptr noundef %10)
  %121 = icmp ne i16 %120, 0
  br i1 %121, label %122, label %123

122:                                              ; preds = %105
  call void @BMP_drawLine(ptr noundef %10)
  br label %123

123:                                              ; preds = %122, %105
  br label %101, !llvm.loop !27

124:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 10, ptr %10) #4
  br label %125

125:                                              ; preds = %124, %96
  ret void
}

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

declare signext i16 @F16_mul(i16 noundef signext, i16 noundef signext) #3

declare zeroext i16 @BMP_isPolygonCulled(ptr noundef, i16 noundef zeroext) #3

declare zeroext i16 @BMP_drawPolygon(ptr noundef, i16 noundef zeroext, i8 noundef zeroext) #3

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

declare zeroext i16 @BMP_clipLine(ptr noundef) #3

declare void @BMP_drawLine(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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"short", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{i64 0, i64 2, !8, i64 2, i64 2, !8}
!13 = !{!14, !9, i64 66}
!14 = !{!"", !9, i64 0, !11, i64 8, !11, i64 16, !15, i64 24, !15, i64 42, !16, i64 60, !16, i64 66}
!15 = !{!"", !16, i64 0, !16, i64 6, !16, i64 12}
!16 = !{!"", !9, i64 0, !9, i64 2, !9, i64 4}
!17 = !{!16, !9, i64 0}
!18 = !{!14, !9, i64 68}
!19 = !{!16, !9, i64 2}
!20 = !{!14, !9, i64 70}
!21 = !{!16, !9, i64 4}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !9, i64 8}
!25 = !{!"", !26, i64 0, !26, i64 4, !9, i64 8}
!26 = !{!"", !9, i64 0, !9, i64 2}
!27 = distinct !{!27, !23}


; 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.Transformation3D = type { i16, ptr, ptr, %struct.Mat3D_f16, %struct.Mat3D_f16, %struct.Vect3D_f16, %struct.Vect3D_f16 }
%struct.Mat3D_f16 = type { %struct.Vect3D_f16, %struct.Vect3D_f16, %struct.Vect3D_f16 }
%struct.Vect3D_f16 = type { i16, i16, i16 }
%struct.Vect2D_s16 = type { i16, i16 }
%struct.Line = type { %struct.Vect2D_s16, %struct.Vect2D_s16, i16 }

@pts_2D = external dso_local local_unnamed_addr global ptr, align 8
@transformation = external dso_local local_unnamed_addr global %struct.Transformation3D, align 8
@flatDrawing = external dso_local local_unnamed_addr global i16, align 2
@cube_face_norm = external local_unnamed_addr constant [6 x %struct.Vect3D_f16], align 16
@cube_poly_ind = external local_unnamed_addr constant [24 x i16], align 16
@cube_line_ind = external local_unnamed_addr constant [24 x i16], align 16

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

; Function Attrs: nounwind uwtable
define dso_local void @drawPoints(i8 noundef zeroext %0) local_unnamed_addr #1 {
  %2 = alloca [4 x %struct.Vect2D_s16], align 16
  %3 = alloca %struct.Line, align 4
  %4 = load i16, ptr @flatDrawing, align 2, !tbaa !5
  %.not = icmp eq i16 %4, 0
  br i1 %.not, label %225, label %5

5:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #3
  %6 = getelementptr inbounds i8, ptr %2, i64 4
  %7 = getelementptr inbounds i8, ptr %2, i64 8
  %8 = getelementptr inbounds i8, ptr %2, i64 12
  %9 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %10 = load i16, ptr @cube_poly_ind, align 16, !tbaa !5
  %11 = zext i16 %10 to i64
  %12 = getelementptr inbounds %struct.Vect2D_s16, ptr %9, i64 %11
  %13 = load i32, ptr %12, align 2
  store i32 %13, ptr %2, align 16
  %14 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 2), align 2, !tbaa !5
  %15 = zext i16 %14 to i64
  %16 = getelementptr inbounds %struct.Vect2D_s16, ptr %9, i64 %15
  %17 = load i32, ptr %16, align 2
  store i32 %17, ptr %6, align 4
  %18 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 4), align 4, !tbaa !5
  %19 = zext i16 %18 to i64
  %20 = getelementptr inbounds %struct.Vect2D_s16, ptr %9, i64 %19
  %21 = load i32, ptr %20, align 2
  store i32 %21, ptr %7, align 8
  %22 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 6), align 2, !tbaa !5
  %23 = zext i16 %22 to i64
  %24 = getelementptr inbounds %struct.Vect2D_s16, ptr %9, i64 %23
  %25 = load i32, ptr %24, align 2
  store i32 %25, ptr %8, align 4
  %26 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 66), align 2, !tbaa !11
  %27 = load i16, ptr @cube_face_norm, align 16, !tbaa !15
  %28 = tail call signext i16 @F16_mul(i16 noundef signext %26, i16 noundef signext %27) #3
  %29 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 68), align 4, !tbaa !16
  %30 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 2), align 2, !tbaa !17
  %31 = tail call signext i16 @F16_mul(i16 noundef signext %29, i16 noundef signext %30) #3
  %32 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 70), align 2, !tbaa !18
  %33 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 4), align 4, !tbaa !19
  %34 = tail call signext i16 @F16_mul(i16 noundef signext %32, i16 noundef signext %33) #3
  %35 = call zeroext i16 @BMP_isPolygonCulled(ptr noundef nonnull %2, i16 noundef zeroext 4) #3
  %.not29 = icmp eq i16 %35, 0
  br i1 %.not29, label %36, label %44

36:                                               ; preds = %5
  %37 = add i16 %31, %28
  %38 = add i16 %37, %34
  %39 = icmp sgt i16 %38, 0
  %40 = lshr i16 %38, 4
  %41 = trunc i16 %40 to i8
  %42 = add i8 %41, 2
  %.021 = select i1 %39, i8 %42, i8 2
  %43 = call zeroext i16 @BMP_drawPolygon(ptr noundef nonnull %2, i16 noundef zeroext 4, i8 noundef zeroext %.021) #3
  br label %44

44:                                               ; preds = %36, %5
  %45 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %46 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 8), align 8, !tbaa !5
  %47 = zext i16 %46 to i64
  %48 = getelementptr inbounds %struct.Vect2D_s16, ptr %45, i64 %47
  %49 = load i32, ptr %48, align 2
  store i32 %49, ptr %2, align 16
  %50 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 10), align 2, !tbaa !5
  %51 = zext i16 %50 to i64
  %52 = getelementptr inbounds %struct.Vect2D_s16, ptr %45, i64 %51
  %53 = load i32, ptr %52, align 2
  store i32 %53, ptr %6, align 4
  %54 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 12), align 4, !tbaa !5
  %55 = zext i16 %54 to i64
  %56 = getelementptr inbounds %struct.Vect2D_s16, ptr %45, i64 %55
  %57 = load i32, ptr %56, align 2
  store i32 %57, ptr %7, align 8
  %58 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 14), align 2, !tbaa !5
  %59 = zext i16 %58 to i64
  %60 = getelementptr inbounds %struct.Vect2D_s16, ptr %45, i64 %59
  %61 = load i32, ptr %60, align 2
  store i32 %61, ptr %8, align 4
  %62 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 66), align 2, !tbaa !11
  %63 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 6), align 2, !tbaa !15
  %64 = call signext i16 @F16_mul(i16 noundef signext %62, i16 noundef signext %63) #3
  %65 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 68), align 4, !tbaa !16
  %66 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 8), align 8, !tbaa !17
  %67 = call signext i16 @F16_mul(i16 noundef signext %65, i16 noundef signext %66) #3
  %68 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 70), align 2, !tbaa !18
  %69 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 10), align 2, !tbaa !19
  %70 = call signext i16 @F16_mul(i16 noundef signext %68, i16 noundef signext %69) #3
  %71 = call zeroext i16 @BMP_isPolygonCulled(ptr noundef nonnull %2, i16 noundef zeroext 4) #3
  %.not29.1 = icmp eq i16 %71, 0
  br i1 %.not29.1, label %72, label %80

72:                                               ; preds = %44
  %73 = add i16 %67, %64
  %74 = add i16 %73, %70
  %75 = icmp sgt i16 %74, 0
  %76 = lshr i16 %74, 4
  %77 = trunc i16 %76 to i8
  %78 = add i8 %77, 2
  %.021.1 = select i1 %75, i8 %78, i8 2
  %79 = call zeroext i16 @BMP_drawPolygon(ptr noundef nonnull %2, i16 noundef zeroext 4, i8 noundef zeroext %.021.1) #3
  br label %80

80:                                               ; preds = %72, %44
  %81 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %82 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 16), align 16, !tbaa !5
  %83 = zext i16 %82 to i64
  %84 = getelementptr inbounds %struct.Vect2D_s16, ptr %81, i64 %83
  %85 = load i32, ptr %84, align 2
  store i32 %85, ptr %2, align 16
  %86 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 18), align 2, !tbaa !5
  %87 = zext i16 %86 to i64
  %88 = getelementptr inbounds %struct.Vect2D_s16, ptr %81, i64 %87
  %89 = load i32, ptr %88, align 2
  store i32 %89, ptr %6, align 4
  %90 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 20), align 4, !tbaa !5
  %91 = zext i16 %90 to i64
  %92 = getelementptr inbounds %struct.Vect2D_s16, ptr %81, i64 %91
  %93 = load i32, ptr %92, align 2
  store i32 %93, ptr %7, align 8
  %94 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 22), align 2, !tbaa !5
  %95 = zext i16 %94 to i64
  %96 = getelementptr inbounds %struct.Vect2D_s16, ptr %81, i64 %95
  %97 = load i32, ptr %96, align 2
  store i32 %97, ptr %8, align 4
  %98 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 66), align 2, !tbaa !11
  %99 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 12), align 4, !tbaa !15
  %100 = call signext i16 @F16_mul(i16 noundef signext %98, i16 noundef signext %99) #3
  %101 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 68), align 4, !tbaa !16
  %102 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 14), align 2, !tbaa !17
  %103 = call signext i16 @F16_mul(i16 noundef signext %101, i16 noundef signext %102) #3
  %104 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 70), align 2, !tbaa !18
  %105 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 16), align 16, !tbaa !19
  %106 = call signext i16 @F16_mul(i16 noundef signext %104, i16 noundef signext %105) #3
  %107 = call zeroext i16 @BMP_isPolygonCulled(ptr noundef nonnull %2, i16 noundef zeroext 4) #3
  %.not29.2 = icmp eq i16 %107, 0
  br i1 %.not29.2, label %108, label %116

108:                                              ; preds = %80
  %109 = add i16 %103, %100
  %110 = add i16 %109, %106
  %111 = icmp sgt i16 %110, 0
  %112 = lshr i16 %110, 4
  %113 = trunc i16 %112 to i8
  %114 = add i8 %113, 2
  %.021.2 = select i1 %111, i8 %114, i8 2
  %115 = call zeroext i16 @BMP_drawPolygon(ptr noundef nonnull %2, i16 noundef zeroext 4, i8 noundef zeroext %.021.2) #3
  br label %116

116:                                              ; preds = %108, %80
  %117 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %118 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 24), align 8, !tbaa !5
  %119 = zext i16 %118 to i64
  %120 = getelementptr inbounds %struct.Vect2D_s16, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 2
  store i32 %121, ptr %2, align 16
  %122 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 26), align 2, !tbaa !5
  %123 = zext i16 %122 to i64
  %124 = getelementptr inbounds %struct.Vect2D_s16, ptr %117, i64 %123
  %125 = load i32, ptr %124, align 2
  store i32 %125, ptr %6, align 4
  %126 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 28), align 4, !tbaa !5
  %127 = zext i16 %126 to i64
  %128 = getelementptr inbounds %struct.Vect2D_s16, ptr %117, i64 %127
  %129 = load i32, ptr %128, align 2
  store i32 %129, ptr %7, align 8
  %130 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 30), align 2, !tbaa !5
  %131 = zext i16 %130 to i64
  %132 = getelementptr inbounds %struct.Vect2D_s16, ptr %117, i64 %131
  %133 = load i32, ptr %132, align 2
  store i32 %133, ptr %8, align 4
  %134 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 66), align 2, !tbaa !11
  %135 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 18), align 2, !tbaa !15
  %136 = call signext i16 @F16_mul(i16 noundef signext %134, i16 noundef signext %135) #3
  %137 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 68), align 4, !tbaa !16
  %138 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 20), align 4, !tbaa !17
  %139 = call signext i16 @F16_mul(i16 noundef signext %137, i16 noundef signext %138) #3
  %140 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 70), align 2, !tbaa !18
  %141 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 22), align 2, !tbaa !19
  %142 = call signext i16 @F16_mul(i16 noundef signext %140, i16 noundef signext %141) #3
  %143 = call zeroext i16 @BMP_isPolygonCulled(ptr noundef nonnull %2, i16 noundef zeroext 4) #3
  %.not29.3 = icmp eq i16 %143, 0
  br i1 %.not29.3, label %144, label %152

144:                                              ; preds = %116
  %145 = add i16 %139, %136
  %146 = add i16 %145, %142
  %147 = icmp sgt i16 %146, 0
  %148 = lshr i16 %146, 4
  %149 = trunc i16 %148 to i8
  %150 = add i8 %149, 2
  %.021.3 = select i1 %147, i8 %150, i8 2
  %151 = call zeroext i16 @BMP_drawPolygon(ptr noundef nonnull %2, i16 noundef zeroext 4, i8 noundef zeroext %.021.3) #3
  br label %152

152:                                              ; preds = %144, %116
  %153 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %154 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 32), align 16, !tbaa !5
  %155 = zext i16 %154 to i64
  %156 = getelementptr inbounds %struct.Vect2D_s16, ptr %153, i64 %155
  %157 = load i32, ptr %156, align 2
  store i32 %157, ptr %2, align 16
  %158 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 34), align 2, !tbaa !5
  %159 = zext i16 %158 to i64
  %160 = getelementptr inbounds %struct.Vect2D_s16, ptr %153, i64 %159
  %161 = load i32, ptr %160, align 2
  store i32 %161, ptr %6, align 4
  %162 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 36), align 4, !tbaa !5
  %163 = zext i16 %162 to i64
  %164 = getelementptr inbounds %struct.Vect2D_s16, ptr %153, i64 %163
  %165 = load i32, ptr %164, align 2
  store i32 %165, ptr %7, align 8
  %166 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 38), align 2, !tbaa !5
  %167 = zext i16 %166 to i64
  %168 = getelementptr inbounds %struct.Vect2D_s16, ptr %153, i64 %167
  %169 = load i32, ptr %168, align 2
  store i32 %169, ptr %8, align 4
  %170 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 66), align 2, !tbaa !11
  %171 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 24), align 8, !tbaa !15
  %172 = call signext i16 @F16_mul(i16 noundef signext %170, i16 noundef signext %171) #3
  %173 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 68), align 4, !tbaa !16
  %174 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 26), align 2, !tbaa !17
  %175 = call signext i16 @F16_mul(i16 noundef signext %173, i16 noundef signext %174) #3
  %176 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 70), align 2, !tbaa !18
  %177 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 28), align 4, !tbaa !19
  %178 = call signext i16 @F16_mul(i16 noundef signext %176, i16 noundef signext %177) #3
  %179 = call zeroext i16 @BMP_isPolygonCulled(ptr noundef nonnull %2, i16 noundef zeroext 4) #3
  %.not29.4 = icmp eq i16 %179, 0
  br i1 %.not29.4, label %180, label %188

180:                                              ; preds = %152
  %181 = add i16 %175, %172
  %182 = add i16 %181, %178
  %183 = icmp sgt i16 %182, 0
  %184 = lshr i16 %182, 4
  %185 = trunc i16 %184 to i8
  %186 = add i8 %185, 2
  %.021.4 = select i1 %183, i8 %186, i8 2
  %187 = call zeroext i16 @BMP_drawPolygon(ptr noundef nonnull %2, i16 noundef zeroext 4, i8 noundef zeroext %.021.4) #3
  br label %188

188:                                              ; preds = %180, %152
  %189 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %190 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 40), align 8, !tbaa !5
  %191 = zext i16 %190 to i64
  %192 = getelementptr inbounds %struct.Vect2D_s16, ptr %189, i64 %191
  %193 = load i32, ptr %192, align 2
  store i32 %193, ptr %2, align 16
  %194 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 42), align 2, !tbaa !5
  %195 = zext i16 %194 to i64
  %196 = getelementptr inbounds %struct.Vect2D_s16, ptr %189, i64 %195
  %197 = load i32, ptr %196, align 2
  store i32 %197, ptr %6, align 4
  %198 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 44), align 4, !tbaa !5
  %199 = zext i16 %198 to i64
  %200 = getelementptr inbounds %struct.Vect2D_s16, ptr %189, i64 %199
  %201 = load i32, ptr %200, align 2
  store i32 %201, ptr %7, align 8
  %202 = load i16, ptr getelementptr inbounds (i8, ptr @cube_poly_ind, i64 46), align 2, !tbaa !5
  %203 = zext i16 %202 to i64
  %204 = getelementptr inbounds %struct.Vect2D_s16, ptr %189, i64 %203
  %205 = load i32, ptr %204, align 2
  store i32 %205, ptr %8, align 4
  %206 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 66), align 2, !tbaa !11
  %207 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 30), align 2, !tbaa !15
  %208 = call signext i16 @F16_mul(i16 noundef signext %206, i16 noundef signext %207) #3
  %209 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 68), align 4, !tbaa !16
  %210 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 32), align 16, !tbaa !17
  %211 = call signext i16 @F16_mul(i16 noundef signext %209, i16 noundef signext %210) #3
  %212 = load i16, ptr getelementptr inbounds (i8, ptr @transformation, i64 70), align 2, !tbaa !18
  %213 = load i16, ptr getelementptr inbounds (i8, ptr @cube_face_norm, i64 34), align 2, !tbaa !19
  %214 = call signext i16 @F16_mul(i16 noundef signext %212, i16 noundef signext %213) #3
  %215 = call zeroext i16 @BMP_isPolygonCulled(ptr noundef nonnull %2, i16 noundef zeroext 4) #3
  %.not29.5 = icmp eq i16 %215, 0
  br i1 %.not29.5, label %216, label %224

216:                                              ; preds = %188
  %217 = add i16 %211, %208
  %218 = add i16 %217, %214
  %219 = icmp sgt i16 %218, 0
  %220 = lshr i16 %218, 4
  %221 = trunc i16 %220 to i8
  %222 = add i8 %221, 2
  %.021.5 = select i1 %219, i8 %222, i8 2
  %223 = call zeroext i16 @BMP_drawPolygon(ptr noundef nonnull %2, i16 noundef zeroext 4, i8 noundef zeroext %.021.5) #3
  br label %224

224:                                              ; preds = %216, %188
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #3
  br label %373

225:                                              ; preds = %1
  call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %3) #3
  %226 = zext i8 %0 to i16
  %227 = getelementptr inbounds i8, ptr %3, i64 8
  store i16 %226, ptr %227, align 4, !tbaa !20
  %228 = getelementptr inbounds i8, ptr %3, i64 4
  %229 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %230 = load i16, ptr @cube_line_ind, align 16, !tbaa !5
  %231 = zext i16 %230 to i64
  %232 = getelementptr inbounds %struct.Vect2D_s16, ptr %229, i64 %231
  %233 = load i32, ptr %232, align 2
  store i32 %233, ptr %3, align 4
  %234 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 2), align 2, !tbaa !5
  %235 = zext i16 %234 to i64
  %236 = getelementptr inbounds %struct.Vect2D_s16, ptr %229, i64 %235
  %237 = load i32, ptr %236, align 2
  store i32 %237, ptr %228, align 4
  %238 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27 = icmp eq i16 %238, 0
  br i1 %.not27, label %240, label %239

239:                                              ; preds = %225
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %240

240:                                              ; preds = %239, %225
  %241 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %242 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 4), align 4, !tbaa !5
  %243 = zext i16 %242 to i64
  %244 = getelementptr inbounds %struct.Vect2D_s16, ptr %241, i64 %243
  %245 = load i32, ptr %244, align 2
  store i32 %245, ptr %3, align 4
  %246 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 6), align 2, !tbaa !5
  %247 = zext i16 %246 to i64
  %248 = getelementptr inbounds %struct.Vect2D_s16, ptr %241, i64 %247
  %249 = load i32, ptr %248, align 2
  store i32 %249, ptr %228, align 4
  %250 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.1 = icmp eq i16 %250, 0
  br i1 %.not27.1, label %252, label %251

251:                                              ; preds = %240
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %252

252:                                              ; preds = %251, %240
  %253 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %254 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 8), align 8, !tbaa !5
  %255 = zext i16 %254 to i64
  %256 = getelementptr inbounds %struct.Vect2D_s16, ptr %253, i64 %255
  %257 = load i32, ptr %256, align 2
  store i32 %257, ptr %3, align 4
  %258 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 10), align 2, !tbaa !5
  %259 = zext i16 %258 to i64
  %260 = getelementptr inbounds %struct.Vect2D_s16, ptr %253, i64 %259
  %261 = load i32, ptr %260, align 2
  store i32 %261, ptr %228, align 4
  %262 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.2 = icmp eq i16 %262, 0
  br i1 %.not27.2, label %264, label %263

263:                                              ; preds = %252
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %264

264:                                              ; preds = %263, %252
  %265 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %266 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 12), align 4, !tbaa !5
  %267 = zext i16 %266 to i64
  %268 = getelementptr inbounds %struct.Vect2D_s16, ptr %265, i64 %267
  %269 = load i32, ptr %268, align 2
  store i32 %269, ptr %3, align 4
  %270 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 14), align 2, !tbaa !5
  %271 = zext i16 %270 to i64
  %272 = getelementptr inbounds %struct.Vect2D_s16, ptr %265, i64 %271
  %273 = load i32, ptr %272, align 2
  store i32 %273, ptr %228, align 4
  %274 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.3 = icmp eq i16 %274, 0
  br i1 %.not27.3, label %276, label %275

275:                                              ; preds = %264
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %276

276:                                              ; preds = %275, %264
  %277 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %278 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 16), align 16, !tbaa !5
  %279 = zext i16 %278 to i64
  %280 = getelementptr inbounds %struct.Vect2D_s16, ptr %277, i64 %279
  %281 = load i32, ptr %280, align 2
  store i32 %281, ptr %3, align 4
  %282 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 18), align 2, !tbaa !5
  %283 = zext i16 %282 to i64
  %284 = getelementptr inbounds %struct.Vect2D_s16, ptr %277, i64 %283
  %285 = load i32, ptr %284, align 2
  store i32 %285, ptr %228, align 4
  %286 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.4 = icmp eq i16 %286, 0
  br i1 %.not27.4, label %288, label %287

287:                                              ; preds = %276
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %288

288:                                              ; preds = %287, %276
  %289 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %290 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 20), align 4, !tbaa !5
  %291 = zext i16 %290 to i64
  %292 = getelementptr inbounds %struct.Vect2D_s16, ptr %289, i64 %291
  %293 = load i32, ptr %292, align 2
  store i32 %293, ptr %3, align 4
  %294 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 22), align 2, !tbaa !5
  %295 = zext i16 %294 to i64
  %296 = getelementptr inbounds %struct.Vect2D_s16, ptr %289, i64 %295
  %297 = load i32, ptr %296, align 2
  store i32 %297, ptr %228, align 4
  %298 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.5 = icmp eq i16 %298, 0
  br i1 %.not27.5, label %300, label %299

299:                                              ; preds = %288
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %300

300:                                              ; preds = %299, %288
  %301 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %302 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 24), align 8, !tbaa !5
  %303 = zext i16 %302 to i64
  %304 = getelementptr inbounds %struct.Vect2D_s16, ptr %301, i64 %303
  %305 = load i32, ptr %304, align 2
  store i32 %305, ptr %3, align 4
  %306 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 26), align 2, !tbaa !5
  %307 = zext i16 %306 to i64
  %308 = getelementptr inbounds %struct.Vect2D_s16, ptr %301, i64 %307
  %309 = load i32, ptr %308, align 2
  store i32 %309, ptr %228, align 4
  %310 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.6 = icmp eq i16 %310, 0
  br i1 %.not27.6, label %312, label %311

311:                                              ; preds = %300
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %312

312:                                              ; preds = %311, %300
  %313 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %314 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 28), align 4, !tbaa !5
  %315 = zext i16 %314 to i64
  %316 = getelementptr inbounds %struct.Vect2D_s16, ptr %313, i64 %315
  %317 = load i32, ptr %316, align 2
  store i32 %317, ptr %3, align 4
  %318 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 30), align 2, !tbaa !5
  %319 = zext i16 %318 to i64
  %320 = getelementptr inbounds %struct.Vect2D_s16, ptr %313, i64 %319
  %321 = load i32, ptr %320, align 2
  store i32 %321, ptr %228, align 4
  %322 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.7 = icmp eq i16 %322, 0
  br i1 %.not27.7, label %324, label %323

323:                                              ; preds = %312
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %324

324:                                              ; preds = %323, %312
  %325 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %326 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 32), align 16, !tbaa !5
  %327 = zext i16 %326 to i64
  %328 = getelementptr inbounds %struct.Vect2D_s16, ptr %325, i64 %327
  %329 = load i32, ptr %328, align 2
  store i32 %329, ptr %3, align 4
  %330 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 34), align 2, !tbaa !5
  %331 = zext i16 %330 to i64
  %332 = getelementptr inbounds %struct.Vect2D_s16, ptr %325, i64 %331
  %333 = load i32, ptr %332, align 2
  store i32 %333, ptr %228, align 4
  %334 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.8 = icmp eq i16 %334, 0
  br i1 %.not27.8, label %336, label %335

335:                                              ; preds = %324
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %336

336:                                              ; preds = %335, %324
  %337 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %338 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 36), align 4, !tbaa !5
  %339 = zext i16 %338 to i64
  %340 = getelementptr inbounds %struct.Vect2D_s16, ptr %337, i64 %339
  %341 = load i32, ptr %340, align 2
  store i32 %341, ptr %3, align 4
  %342 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 38), align 2, !tbaa !5
  %343 = zext i16 %342 to i64
  %344 = getelementptr inbounds %struct.Vect2D_s16, ptr %337, i64 %343
  %345 = load i32, ptr %344, align 2
  store i32 %345, ptr %228, align 4
  %346 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.9 = icmp eq i16 %346, 0
  br i1 %.not27.9, label %348, label %347

347:                                              ; preds = %336
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %348

348:                                              ; preds = %347, %336
  %349 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %350 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 40), align 8, !tbaa !5
  %351 = zext i16 %350 to i64
  %352 = getelementptr inbounds %struct.Vect2D_s16, ptr %349, i64 %351
  %353 = load i32, ptr %352, align 2
  store i32 %353, ptr %3, align 4
  %354 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 42), align 2, !tbaa !5
  %355 = zext i16 %354 to i64
  %356 = getelementptr inbounds %struct.Vect2D_s16, ptr %349, i64 %355
  %357 = load i32, ptr %356, align 2
  store i32 %357, ptr %228, align 4
  %358 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.10 = icmp eq i16 %358, 0
  br i1 %.not27.10, label %360, label %359

359:                                              ; preds = %348
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %360

360:                                              ; preds = %359, %348
  %361 = load ptr, ptr @pts_2D, align 8, !tbaa !9
  %362 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 44), align 4, !tbaa !5
  %363 = zext i16 %362 to i64
  %364 = getelementptr inbounds %struct.Vect2D_s16, ptr %361, i64 %363
  %365 = load i32, ptr %364, align 2
  store i32 %365, ptr %3, align 4
  %366 = load i16, ptr getelementptr inbounds (i8, ptr @cube_line_ind, i64 46), align 2, !tbaa !5
  %367 = zext i16 %366 to i64
  %368 = getelementptr inbounds %struct.Vect2D_s16, ptr %361, i64 %367
  %369 = load i32, ptr %368, align 2
  store i32 %369, ptr %228, align 4
  %370 = call zeroext i16 @BMP_clipLine(ptr noundef nonnull %3) #3
  %.not27.11 = icmp eq i16 %370, 0
  br i1 %.not27.11, label %372, label %371

371:                                              ; preds = %360
  call void @BMP_drawLine(ptr noundef nonnull %3) #3
  br label %372

372:                                              ; preds = %371, %360
  call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %3) #3
  br label %373

373:                                              ; preds = %372, %224
  ret void
}

declare signext i16 @F16_mul(i16 noundef signext, i16 noundef signext) local_unnamed_addr #2

declare zeroext i16 @BMP_isPolygonCulled(ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

declare zeroext i16 @BMP_drawPolygon(ptr noundef, i16 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

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

declare zeroext i16 @BMP_clipLine(ptr noundef) local_unnamed_addr #2

declare void @BMP_drawLine(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress 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 = { 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 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 66}
!12 = !{!"", !6, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !13, i64 42, !14, i64 60, !14, i64 66}
!13 = !{!"", !14, i64 0, !14, i64 6, !14, i64 12}
!14 = !{!"", !6, i64 0, !6, i64 2, !6, i64 4}
!15 = !{!14, !6, i64 0}
!16 = !{!12, !6, i64 68}
!17 = !{!14, !6, i64 2}
!18 = !{!12, !6, i64 70}
!19 = !{!14, !6, i64 4}
!20 = !{!21, !6, i64 8}
!21 = !{!"", !22, i64 0, !22, i64 4, !6, i64 8}
!22 = !{!"", !6, i64 0, !6, i64 2}


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