; LLVM IR from ermig1979/Simd :: src/Test/TestDrawing.ll (ZN4Test19DrawLineSpecialTestERKNS_7OptionsE)

; 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::View" = type <{ i64, i64, i64, i32, [4 x i8], ptr, i8, [7 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@_ZN4Test1WE = external global i32, align 4
@_ZN4Test1HE = external global i32, align 4
@.str.14 = external hidden unnamed_addr constant [10 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4Test19DrawLineSpecialTestERKNS_7OptionsE(ptr noundef nonnull align 8 dereferenceable(256) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.Simd::View", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #5
  %18 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  %20 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = call noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv()
  call void @_ZN4Simd4ViewINS_9AllocatorEEC2EmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41) %3, i64 noundef %19, i64 noundef %21, i32 noundef 1, ptr noundef null, i64 noundef %22)
  invoke void @_ZN4Simd4FillINS_9AllocatorEEEvRNS_4ViewIT_EEh(ptr noundef nonnull align 8 dereferenceable(41) %3, i8 noundef zeroext 0)
          to label %23 unwind label %28

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store i64 55, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 256, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 20, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 3, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 55, ptr %10, align 8, !tbaa !11
  br label %24

24:                                               ; preds = %92, %23
  %25 = load i64, ptr %10, align 8, !tbaa !11
  %26 = icmp ult i64 %25, 256
  br i1 %26, label %32, label %27

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %119

28:                                               ; preds = %1
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %4, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %5, align 4
  br label %133

32:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %33 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !9
  %34 = mul nsw i32 %33, 2
  %35 = invoke noundef i32 @_ZN4Test6RandomEi(i32 noundef %34)
          to label %36 unwind label %95

36:                                               ; preds = %32
  %37 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !9
  %38 = sdiv i32 %37, 2
  %39 = sub nsw i32 %35, %38
  %40 = sext i32 %39 to i64
  store i64 %40, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %41 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !9
  %42 = mul nsw i32 %41, 2
  %43 = invoke noundef i32 @_ZN4Test6RandomEi(i32 noundef %42)
          to label %44 unwind label %99

44:                                               ; preds = %36
  %45 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !9
  %46 = sdiv i32 %45, 2
  %47 = sub nsw i32 %43, %46
  %48 = sext i32 %47 to i64
  store i64 %48, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %49 = load i64, ptr %10, align 8, !tbaa !11
  %50 = urem i64 %49, 20
  %51 = icmp eq i64 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %44
  %53 = load i64, ptr %11, align 8, !tbaa !11
  br label %63

54:                                               ; preds = %44
  %55 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !9
  %56 = mul nsw i32 %55, 2
  %57 = invoke noundef i32 @_ZN4Test6RandomEi(i32 noundef %56)
          to label %58 unwind label %103

58:                                               ; preds = %54
  %59 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !9
  %60 = sdiv i32 %59, 2
  %61 = sub nsw i32 %57, %60
  %62 = sext i32 %61 to i64
  br label %63

63:                                               ; preds = %58, %52
  %64 = phi i64 [ %53, %52 ], [ %62, %58 ]
  store i64 %64, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %65 = load i64, ptr %10, align 8, !tbaa !11
  %66 = urem i64 %65, 20
  %67 = icmp eq i64 %66, 1
  br i1 %67, label %68, label %70

68:                                               ; preds = %63
  %69 = load i64, ptr %12, align 8, !tbaa !11
  br label %79

70:                                               ; preds = %63
  %71 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !9
  %72 = mul nsw i32 %71, 2
  %73 = invoke noundef i32 @_ZN4Test6RandomEi(i32 noundef %72)
          to label %74 unwind label %107

74:                                               ; preds = %70
  %75 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !9
  %76 = sdiv i32 %75, 2
  %77 = sub nsw i32 %73, %76
  %78 = sext i32 %77 to i64
  br label %79

79:                                               ; preds = %74, %68
  %80 = phi i64 [ %69, %68 ], [ %78, %74 ]
  store i64 %80, ptr %14, align 8, !tbaa !11
  %81 = load i64, ptr %11, align 8, !tbaa !11
  %82 = load i64, ptr %12, align 8, !tbaa !11
  %83 = load i64, ptr %13, align 8, !tbaa !11
  %84 = load i64, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  %85 = load i64, ptr %10, align 8, !tbaa !11
  %86 = trunc i64 %85 to i8
  store i8 %86, ptr %15, align 1, !tbaa !13
  %87 = invoke noundef i32 @_ZN4Test6RandomEi(i32 noundef 3)
          to label %88 unwind label %111

88:                                               ; preds = %79
  %89 = add nsw i32 %87, 1
  %90 = sext i32 %89 to i64
  invoke void @_ZN4Simd8DrawLineINS_9AllocatorEhEEvRNS_4ViewIT_EEllllRKT0_m(ptr noundef nonnull align 8 dereferenceable(41) %3, i64 noundef %81, i64 noundef %82, i64 noundef %83, i64 noundef %84, ptr noundef nonnull align 1 dereferenceable(1) %15, i64 noundef %90)
          to label %91 unwind label %111

91:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %92

92:                                               ; preds = %91
  %93 = load i64, ptr %10, align 8, !tbaa !11
  %94 = add i64 %93, 1
  store i64 %94, ptr %10, align 8, !tbaa !11
  br label %24, !llvm.loop !14

95:                                               ; preds = %32
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %4, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %5, align 4
  br label %118

99:                                               ; preds = %36
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %4, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %5, align 4
  br label %117

103:                                              ; preds = %54
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %4, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %5, align 4
  br label %116

107:                                              ; preds = %70
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %4, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %5, align 4
  br label %115

111:                                              ; preds = %88, %79
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %4, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  br label %115

115:                                              ; preds = %111, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %116

116:                                              ; preds = %115, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %117

117:                                              ; preds = %116, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %118

118:                                              ; preds = %117, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %132

119:                                              ; preds = %27
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %120 unwind label %123

120:                                              ; preds = %119
  %121 = invoke noundef zeroext i1 @_ZNK4Simd4ViewINS_9AllocatorEE4SaveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE17SimdImageFileTypei(ptr noundef nonnull align 8 dereferenceable(41) %3, ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 0, i32 noundef 100)
          to label %122 unwind label %127

122:                                              ; preds = %120
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @_ZN4Simd4ViewINS_9AllocatorEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #5
  ret i1 true

123:                                              ; preds = %119
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %4, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %5, align 4
  br label %131

127:                                              ; preds = %120
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %4, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %5, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %131

131:                                              ; preds = %127, %123
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %132

132:                                              ; preds = %131, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %133

133:                                              ; preds = %132, %28
  call void @_ZN4Simd4ViewINS_9AllocatorEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %3) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #5
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %4, align 8
  %136 = load i32, ptr %5, align 4
  %137 = insertvalue { ptr, i32 } poison, ptr %135, 0
  %138 = insertvalue { ptr, i32 } %137, i32 %136, 1
  resume { ptr, i32 } %138
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv() #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4ViewINS_9AllocatorEEC2EmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, i32 noundef, ptr noundef, i64 noundef) unnamed_addr #3 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 nounwind uwtable
declare dso_local noundef i32 @_ZN4Test6RandomEi(i32 noundef) #4

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd8DrawLineINS_9AllocatorEhEEvRNS_4ViewIT_EEllllRKT0_m(ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, i64 noundef, i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


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

%"struct.Simd::View" = type <{ i64, i64, i64, i32, [4 x i8], ptr, i8, [7 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@_ZN4Test1WE = external local_unnamed_addr global i32, align 4
@_ZN4Test1HE = external local_unnamed_addr global i32, align 4
@.str.14 = external hidden unnamed_addr constant [10 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4Test19DrawLineSpecialTestERKNS_7OptionsE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(256) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.Simd::View", align 8
  %3 = alloca i8, align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #5
  %6 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = tail call noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv()
  call void @_ZN4Simd4ViewINS_9AllocatorEEC2EmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41) %2, i64 noundef %7, i64 noundef %9, i32 noundef 1, ptr noundef null, i64 noundef %10)
  invoke void @_ZN4Simd4FillINS_9AllocatorEEEvRNS_4ViewIT_EEh(ptr noundef nonnull align 8 dereferenceable(41) %2, i8 noundef zeroext 0)
          to label %.preheader unwind label %12

11:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %53 unwind label %56

12:                                               ; preds = %1
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %61

.preheader:                                       ; preds = %1, %49
  %.01523 = phi i64 [ %50, %49 ], [ 55, %1 ]
  %14 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !5
  %15 = shl nsw i32 %14, 1
  %16 = call noundef i32 @_ZN4Test6RandomEi(i32 noundef %15)
  %17 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !5
  %.neg = sdiv i32 %17, -2
  %18 = add i32 %.neg, %16
  %19 = sext i32 %18 to i64
  %20 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !5
  %21 = shl nsw i32 %20, 1
  %22 = call noundef i32 @_ZN4Test6RandomEi(i32 noundef %21)
  %23 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !5
  %.neg17 = sdiv i32 %23, -2
  %24 = add i32 %.neg17, %22
  %25 = sext i32 %24 to i64
  %.lhs.trunc = trunc nuw i64 %.01523 to i8
  %26 = urem i8 %.lhs.trunc, 20
  %27 = icmp eq i8 %26, 0
  br i1 %27, label %.thread, label %28

28:                                               ; preds = %.preheader
  %29 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !5
  %30 = shl nsw i32 %29, 1
  %31 = call noundef i32 @_ZN4Test6RandomEi(i32 noundef %30)
  %32 = load i32, ptr @_ZN4Test1WE, align 4, !tbaa !5
  %.neg18 = sdiv i32 %32, -2
  %33 = add i32 %.neg18, %31
  %34 = sext i32 %33 to i64
  %35 = icmp eq i8 %26, 1
  br i1 %35, label %43, label %..thread_crit_edge

..thread_crit_edge:                               ; preds = %28
  %.pre = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %..thread_crit_edge, %.preheader
  %36 = phi i32 [ %.pre, %..thread_crit_edge ], [ %23, %.preheader ]
  %37 = phi i64 [ %34, %..thread_crit_edge ], [ %19, %.preheader ]
  %38 = shl nsw i32 %36, 1
  %39 = call noundef i32 @_ZN4Test6RandomEi(i32 noundef %38)
  %40 = load i32, ptr @_ZN4Test1HE, align 4, !tbaa !5
  %.neg19 = sdiv i32 %40, -2
  %41 = add i32 %.neg19, %39
  %42 = sext i32 %41 to i64
  br label %43

43:                                               ; preds = %28, %.thread
  %44 = phi i64 [ %37, %.thread ], [ %34, %28 ]
  %45 = phi i64 [ %42, %.thread ], [ %25, %28 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  store i8 %.lhs.trunc, ptr %3, align 1, !tbaa !9
  %46 = call noundef i32 @_ZN4Test6RandomEi(i32 noundef 3)
  %47 = add nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  invoke void @_ZN4Simd8DrawLineINS_9AllocatorEhEEvRNS_4ViewIT_EEllllRKT0_m(ptr noundef nonnull align 8 dereferenceable(41) %2, i64 noundef %19, i64 noundef %25, i64 noundef %44, i64 noundef %45, ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef %48)
          to label %49 unwind label %51

49:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  %50 = add nuw nsw i64 %.01523, 1
  %exitcond.not = icmp eq i64 %50, 256
  br i1 %exitcond.not, label %11, label %.preheader, !llvm.loop !10

51:                                               ; preds = %43
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  br label %61

53:                                               ; preds = %11
  %54 = invoke noundef zeroext i1 @_ZNK4Simd4ViewINS_9AllocatorEE4SaveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE17SimdImageFileTypei(ptr noundef nonnull align 8 dereferenceable(41) %2, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 0, i32 noundef 100)
          to label %55 unwind label %58

55:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  call void @_ZN4Simd4ViewINS_9AllocatorEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #5
  ret i1 true

56:                                               ; preds = %11
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %60

58:                                               ; preds = %53
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %60

60:                                               ; preds = %58, %56
  %.pn = phi { ptr, i32 } [ %59, %58 ], [ %57, %56 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %61

61:                                               ; preds = %51, %60, %12
  %.pn20.pn = phi { ptr, i32 } [ %13, %12 ], [ %52, %51 ], [ %.pn, %60 ]
  call void @_ZN4Simd4ViewINS_9AllocatorEED2Ev(ptr noundef nonnull align 8 dereferenceable(41) %2) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn20.pn
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv() local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4ViewINS_9AllocatorEEC2EmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, i32 noundef, ptr noundef, i64 noundef) unnamed_addr #3 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 nounwind uwtable
declare dso_local noundef i32 @_ZN4Test6RandomEi(i32 noundef) local_unnamed_addr #4

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass