; LLVM IR from ermig1979/Simd :: src/Test (TestRandom)

; 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.Simd::Point" = type { i64, i64 }
%"struct.Simd::Rectangle" = type { i64, i64, i64, i64 }
%"struct.Simd::View" = type <{ i64, i64, i64, i32, [4 x i8], ptr, i8, [7 x i8] }>

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [63 x i8], align 1
@__PRETTY_FUNCTION__._ZN4Test13FillRhombMaskERN4Simd4ViewINS0_9AllocatorEEERKNS0_9RectangleIlEEh = external hidden unnamed_addr constant [56 x i8], align 1

; 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4Test6Rand8uEv() #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK4Simd4ViewINS_9AllocatorEE4SizeEv(ptr dead_on_unwind noalias writable sret(%"struct.Simd::Point") align 8, ptr noundef nonnull align 8 dereferenceable(41)) #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Test13FillRhombMaskERN4Simd4ViewINS0_9AllocatorEEERKNS0_9RectangleIlEEh(ptr noundef nonnull align 8 dereferenceable(41) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef zeroext %2) #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca %"struct.Simd::Rectangle", align 8
  %8 = alloca i1, align 1
  %9 = alloca %"struct.Simd::Point", align 8
  %10 = alloca i1, align 1
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i1, align 1
  %15 = alloca %"struct.Simd::Point", align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i8 %2, ptr %6, align 1, !tbaa !9
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.Simd::View", ptr %24, i32 0, i32 3
  %26 = load i32, ptr %25, align 8, !tbaa !10
  %27 = icmp eq i32 %26, 1
  store i1 false, ptr %8, align 1
  store i1 false, ptr %10, align 1
  store i1 false, ptr %11, align 1
  store i1 false, ptr %14, align 1
  br i1 %27, label %28, label %34

28:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #5
  store i1 true, ptr %8, align 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  store i1 true, ptr %10, align 1
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK4Simd4ViewINS_9AllocatorEE4SizeEv(ptr dead_on_unwind writable sret(%"struct.Simd::Point") align 8 %9, ptr noundef nonnull align 8 dereferenceable(41) %29)
  store i1 true, ptr %11, align 1
  invoke void @_ZN4Simd9RectangleIlEC2IlEERKNS_5PointIT_EE(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %30 unwind label %38

30:                                               ; preds = %28
  store i1 true, ptr %14, align 1
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = invoke noundef zeroext i1 @_ZNK4Simd9RectangleIlE8ContainsIlEEbRKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %31)
          to label %33 unwind label %42

33:                                               ; preds = %30
  br label %34

34:                                               ; preds = %33, %3
  %35 = phi i1 [ false, %3 ], [ %32, %33 ]
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  br label %48

37:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 302, ptr noundef @__PRETTY_FUNCTION__._ZN4Test13FillRhombMaskERN4Simd4ViewINS0_9AllocatorEEERKNS0_9RectangleIlEEh) #6
  unreachable

38:                                               ; preds = %28
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %12, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %13, align 4
  br label %75

42:                                               ; preds = %30
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %12, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %13, align 4
  %46 = load i1, ptr %14, align 1
  br i1 %46, label %73, label %74

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %36
  %49 = load i1, ptr %14, align 1
  br i1 %49, label %50, label %51

50:                                               ; preds = %48
  call void @_ZN4Simd9RectangleIlED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %51

51:                                               ; preds = %50, %48
  %52 = load i1, ptr %11, align 1
  br i1 %52, label %53, label %54

53:                                               ; preds = %51
  call void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br label %54

54:                                               ; preds = %53, %51
  %55 = load i1, ptr %10, align 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %57

57:                                               ; preds = %56, %54
  %58 = load i1, ptr %8, align 1
  br i1 %58, label %59, label %60

59:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %60

60:                                               ; preds = %59, %57
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN4Simd4FillINS_9AllocatorEEEvRNS_4ViewIT_EEh(ptr noundef nonnull align 8 dereferenceable(41) %61, i8 noundef zeroext 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK4Simd9RectangleIlE6CenterEv(ptr dead_on_unwind writable sret(%"struct.Simd::Point") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %62)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.Simd::Rectangle", ptr %63, i32 0, i32 1
  %65 = load i64, ptr %64, align 8, !tbaa !15
  store i64 %65, ptr %16, align 8, !tbaa !17
  br label %66

66:                                               ; preds = %159, %60
  %67 = load i64, ptr %16, align 8, !tbaa !17
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.Simd::Rectangle", ptr %68, i32 0, i32 3
  %70 = load i64, ptr %69, align 8, !tbaa !18
  %71 = icmp slt i64 %67, %70
  br i1 %71, label %85, label %72

72:                                               ; preds = %66
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %163

73:                                               ; preds = %42
  call void @_ZN4Simd9RectangleIlED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %74

74:                                               ; preds = %73, %42
  br label %75

75:                                               ; preds = %74, %38
  %76 = load i1, ptr %11, align 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %75
  call void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br label %78

78:                                               ; preds = %77, %75
  %79 = load i1, ptr %10, align 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %81

81:                                               ; preds = %80, %78
  %82 = load i1, ptr %8, align 1
  br i1 %82, label %83, label %84

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #5
  br label %84

84:                                               ; preds = %83, %81
  br label %164

85:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %86 = load i64, ptr %16, align 8, !tbaa !17
  %87 = getelementptr inbounds %"struct.Simd::Point", ptr %15, i32 0, i32 1
  %88 = load i64, ptr %87, align 8, !tbaa !19
  %89 = sub nsw i64 %86, %88
  %90 = invoke noundef i64 @_ZN4Simd3AbsIlEET_S1_(i64 noundef %89)
          to label %91 unwind label %125

91:                                               ; preds = %85
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = invoke noundef i64 @_ZNK4Simd9RectangleIlE5WidthEv(ptr noundef nonnull align 8 dereferenceable(32) %92)
          to label %94 unwind label %125

94:                                               ; preds = %91
  %95 = mul nsw i64 %90, %93
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = invoke noundef i64 @_ZNK4Simd9RectangleIlE6HeightEv(ptr noundef nonnull align 8 dereferenceable(32) %96)
          to label %98 unwind label %125

98:                                               ; preds = %94
  %99 = sdiv i64 %95, %97
  store i64 %99, ptr %18, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.Simd::Rectangle", ptr %100, i32 0, i32 0
  %102 = load i64, ptr %101, align 8, !tbaa !21
  %103 = load i64, ptr %18, align 8, !tbaa !17
  %104 = add nsw i64 %102, %103
  store i64 %104, ptr %19, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %"struct.Simd::Rectangle", ptr %105, i32 0, i32 2
  %107 = load i64, ptr %106, align 8, !tbaa !22
  %108 = load i64, ptr %18, align 8, !tbaa !17
  %109 = sub nsw i64 %107, %108
  store i64 %109, ptr %20, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %110 = load i64, ptr %16, align 8, !tbaa !17
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.Simd::View", ptr %111, i32 0, i32 2
  %113 = load i64, ptr %112, align 8, !tbaa !23
  %114 = mul nsw i64 %110, %113
  %115 = load i64, ptr %19, align 8, !tbaa !17
  %116 = add nsw i64 %114, %115
  store i64 %116, ptr %21, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %117 = invoke noundef ptr @_ZN4Test6Rand8uEv()
          to label %118 unwind label %129

118:                                              ; preds = %98
  store ptr %117, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %119 = load i64, ptr %19, align 8, !tbaa !17
  store i64 %119, ptr %23, align 8, !tbaa !17
  br label %120

120:                                              ; preds = %153, %118
  %121 = load i64, ptr %23, align 8, !tbaa !17
  %122 = load i64, ptr %20, align 8, !tbaa !17
  %123 = icmp slt i64 %121, %122
  br i1 %123, label %133, label %124

124:                                              ; preds = %120
  store i32 5, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %158

125:                                              ; preds = %94, %91, %85
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %12, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %13, align 4
  br label %162

129:                                              ; preds = %98
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %12, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %162

133:                                              ; preds = %120
  %134 = load ptr, ptr %22, align 8, !tbaa !5
  %135 = load i64, ptr %23, align 8, !tbaa !17
  %136 = getelementptr inbounds i8, ptr %134, i64 %135
  %137 = load i8, ptr %136, align 1, !tbaa !9
  %138 = zext i8 %137 to i32
  %139 = and i32 %138, 1
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %144

141:                                              ; preds = %133
  %142 = load i8, ptr %6, align 1, !tbaa !9
  %143 = zext i8 %142 to i32
  br label %145

144:                                              ; preds = %133
  br label %145

145:                                              ; preds = %144, %141
  %146 = phi i32 [ %143, %141 ], [ 0, %144 ]
  %147 = trunc i32 %146 to i8
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %"struct.Simd::View", ptr %148, i32 0, i32 5
  %150 = load ptr, ptr %149, align 8, !tbaa !24
  %151 = load i64, ptr %21, align 8, !tbaa !17
  %152 = getelementptr inbounds i8, ptr %150, i64 %151
  store i8 %147, ptr %152, align 1, !tbaa !9
  br label %153

153:                                              ; preds = %145
  %154 = load i64, ptr %23, align 8, !tbaa !17
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %23, align 8, !tbaa !17
  %156 = load i64, ptr %21, align 8, !tbaa !17
  %157 = add nsw i64 %156, 1
  store i64 %157, ptr %21, align 8, !tbaa !17
  br label %120, !llvm.loop !25

158:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %159

159:                                              ; preds = %158
  %160 = load i64, ptr %16, align 8, !tbaa !17
  %161 = add nsw i64 %160, 1
  store i64 %161, ptr %16, align 8, !tbaa !17
  br label %66, !llvm.loop !27

162:                                              ; preds = %129, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %164

163:                                              ; preds = %72
  call void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  ret void

164:                                              ; preds = %162, %84
  %165 = load ptr, ptr %12, align 8
  %166 = load i32, ptr %13, align 4
  %167 = insertvalue { ptr, i32 } poison, ptr %165, 0
  %168 = insertvalue { ptr, i32 } %167, i32 %166, 1
  resume { ptr, i32 } %168
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd9RectangleIlEC2IlEERKNS_5PointIT_EE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4Simd9RectangleIlE8ContainsIlEEbRKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd9RectangleIlED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4FillINS_9AllocatorEEEvRNS_4ViewIT_EEh(ptr noundef nonnull align 8 dereferenceable(41), i8 noundef zeroext) #3

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK4Simd9RectangleIlE6CenterEv(ptr dead_on_unwind noalias writable sret(%"struct.Simd::Point") align 8, ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd3AbsIlEET_S1_(i64 noundef) #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4Simd9RectangleIlE5WidthEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4Simd9RectangleIlE6HeightEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #2 = { alwaysinline mustprogress 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 = { alwaysinline mustprogress 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 = { mustprogress 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 #5 = { nounwind }
attributes #6 = { noreturn 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !13, i64 24}
!11 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEEE", !12, i64 0, !12, i64 8, !12, i64 16, !13, i64 24, !6, i64 32, !14, i64 40}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEE6FormatE", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !12, i64 8}
!16 = !{!"_ZTSN4Simd9RectangleIlEE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!17 = !{!12, !12, i64 0}
!18 = !{!16, !12, i64 24}
!19 = !{!20, !12, i64 8}
!20 = !{!"_ZTSN4Simd5PointIlEE", !12, i64 0, !12, i64 8}
!21 = !{!16, !12, i64 0}
!22 = !{!16, !12, i64 16}
!23 = !{!11, !12, i64 16}
!24 = !{!11, !6, i64 32}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}


; 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.Simd::Point" = type { i64, i64 }
%"struct.Simd::Rectangle" = type { i64, i64, i64, i64 }

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [63 x i8], align 1
@__PRETTY_FUNCTION__._ZN4Test13FillRhombMaskERN4Simd4ViewINS0_9AllocatorEEERKNS0_9RectangleIlEEh = external hidden unnamed_addr constant [56 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4Test6Rand8uEv() local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK4Simd4ViewINS_9AllocatorEE4SizeEv(ptr dead_on_unwind noalias writable sret(%"struct.Simd::Point") align 8, ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4Test13FillRhombMaskERN4Simd4ViewINS0_9AllocatorEEERKNS0_9RectangleIlEEh(ptr noundef nonnull align 8 dereferenceable(41) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i8 noundef zeroext %2) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.Simd::Rectangle", align 8
  %5 = alloca %"struct.Simd::Point", align 8
  %6 = alloca %"struct.Simd::Point", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = icmp eq i32 %8, 1
  br i1 %9, label %10, label %.critedge

10:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @_ZNK4Simd4ViewINS_9AllocatorEE4SizeEv(ptr dead_on_unwind nonnull writable sret(%"struct.Simd::Point") align 8 %5, ptr noundef nonnull align 8 dereferenceable(41) %0)
  call void @_ZN4Simd9RectangleIlEC2IlEERKNS_5PointIT_EE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %11 = invoke noundef zeroext i1 @_ZNK4Simd9RectangleIlE8ContainsIlEEbRKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %12 unwind label %13

12:                                               ; preds = %10
  br i1 %11, label %15, label %.critedge

.critedge:                                        ; preds = %3, %12
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 302, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4Test13FillRhombMaskERN4Simd4ViewINS0_9AllocatorEEERKNS0_9RectangleIlEEh) #6
  unreachable

13:                                               ; preds = %10
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4Simd9RectangleIlED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  resume { ptr, i32 } %14

15:                                               ; preds = %12
  call void @_ZN4Simd9RectangleIlED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZN4Simd4FillINS_9AllocatorEEEvRNS_4ViewIT_EEh(ptr noundef nonnull align 8 dereferenceable(41) %0, i8 noundef zeroext 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @_ZNK4Simd9RectangleIlE6CenterEv(ptr dead_on_unwind nonnull writable sret(%"struct.Simd::Point") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %16 = getelementptr inbounds i8, ptr %1, i64 8
  %17 = load i64, ptr %16, align 8, !tbaa !13
  %18 = getelementptr inbounds i8, ptr %1, i64 24
  %19 = load i64, ptr %18, align 8, !tbaa !15
  %20 = icmp slt i64 %17, %19
  br i1 %20, label %.lr.ph44, label %._crit_edge45

.lr.ph44:                                         ; preds = %15
  %21 = getelementptr inbounds i8, ptr %6, i64 8
  %22 = getelementptr inbounds i8, ptr %1, i64 16
  %23 = getelementptr inbounds i8, ptr %0, i64 16
  %24 = getelementptr inbounds i8, ptr %0, i64 32
  br label %25

._crit_edge45:                                    ; preds = %._crit_edge, %15
  call void @_ZN4Simd5PointIlED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  ret void

25:                                               ; preds = %.lr.ph44, %._crit_edge
  %.03942 = phi i64 [ %17, %.lr.ph44 ], [ %42, %._crit_edge ]
  %26 = load i64, ptr %21, align 8, !tbaa !16
  %27 = sub nsw i64 %.03942, %26
  %28 = call noundef i64 @_ZN4Simd3AbsIlEET_S1_(i64 noundef %27)
  %29 = call noundef i64 @_ZNK4Simd9RectangleIlE5WidthEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %30 = mul nsw i64 %29, %28
  %31 = call noundef i64 @_ZNK4Simd9RectangleIlE6HeightEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %32 = sdiv i64 %30, %31
  %33 = load i64, ptr %1, align 8, !tbaa !18
  %34 = add nsw i64 %33, %32
  %35 = load i64, ptr %22, align 8, !tbaa !19
  %36 = sub nsw i64 %35, %32
  %37 = load i64, ptr %23, align 8, !tbaa !20
  %38 = call noundef ptr @_ZN4Test6Rand8uEv()
  %39 = icmp slt i64 %34, %36
  br i1 %39, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %25
  %40 = mul nsw i64 %37, %.03942
  %41 = add nsw i64 %40, %34
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %25
  %42 = add nsw i64 %.03942, 1
  %43 = load i64, ptr %18, align 8, !tbaa !15
  %44 = icmp slt i64 %42, %43
  br i1 %44, label %25, label %._crit_edge45, !llvm.loop !21

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.041 = phi i64 [ %50, %.lr.ph ], [ %34, %.lr.ph.preheader ]
  %.03840 = phi i64 [ %51, %.lr.ph ], [ %41, %.lr.ph.preheader ]
  %45 = getelementptr inbounds i8, ptr %38, i64 %.041
  %46 = load i8, ptr %45, align 1, !tbaa !23
  %47 = and i8 %46, 1
  %.not = icmp eq i8 %47, 0
  %narrow = select i1 %.not, i8 0, i8 %2
  %48 = load ptr, ptr %24, align 8, !tbaa !24
  %49 = getelementptr inbounds i8, ptr %48, i64 %.03840
  store i8 %narrow, ptr %49, align 1, !tbaa !23
  %50 = add nsw i64 %.041, 1
  %51 = add nsw i64 %.03840, 1
  %52 = icmp slt i64 %50, %36
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !25
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd9RectangleIlEC2IlEERKNS_5PointIT_EE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4Simd9RectangleIlE8ContainsIlEEbRKNS0_IT_EE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN4Simd9RectangleIlED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4FillINS_9AllocatorEEEvRNS_4ViewIT_EEh(ptr noundef nonnull align 8 dereferenceable(41), i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZNK4Simd9RectangleIlE6CenterEv(ptr dead_on_unwind noalias writable sret(%"struct.Simd::Point") align 8, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd3AbsIlEET_S1_(i64 noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4Simd9RectangleIlE5WidthEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4Simd9RectangleIlE6HeightEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 #2 = { alwaysinline mustprogress 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 = { alwaysinline mustprogress 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 = { mustprogress 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 #5 = { nounwind }
attributes #6 = { noreturn 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 24}
!6 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEEE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 32, !12, i64 40}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEE6FormatE", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!14, !7, i64 8}
!14 = !{!"_ZTSN4Simd9RectangleIlEE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!15 = !{!14, !7, i64 24}
!16 = !{!17, !7, i64 8}
!17 = !{!"_ZTSN4Simd5PointIlEE", !7, i64 0, !7, i64 8}
!18 = !{!14, !7, i64 0}
!19 = !{!14, !7, i64 16}
!20 = !{!6, !7, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!8, !8, i64 0}
!24 = !{!6, !11, i64 32}
!25 = distinct !{!25, !22}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass