; LLVM IR from DarrenSweeney/3D-Physics-Engine :: Physics Engine/Imgui/imgui.ll (ZN10ImDrawList6AddArcERK6ImVec2fjiibS2_)

; 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.ImVec2 = type { float, float }

@_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx = external hidden global [12 x %struct.ImVec2], align 16
@_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx = external hidden global i64, align 8
@_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E17circle_vtx_builds = external hidden global i8, align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8), float noundef) #2

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #3

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ImDrawList6AddArcERK6ImVec2fjiibS2_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i1 noundef zeroext %6, ptr noundef nonnull align 4 dereferenceable(8) %7) #4 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca float, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.ImVec2, align 4
  %23 = alloca %struct.ImVec2, align 4
  %24 = alloca %struct.ImVec2, align 4
  %25 = alloca %struct.ImVec2, align 4
  %26 = alloca %struct.ImVec2, align 4
  %27 = alloca i32, align 4
  %28 = alloca %struct.ImVec2, align 4
  %29 = alloca %struct.ImVec2, align 4
  %30 = alloca %struct.ImVec2, align 4
  %31 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store float %2, ptr %11, align 4, !tbaa !9
  store i32 %3, ptr %12, align 4, !tbaa !11
  store i32 %4, ptr %13, align 4, !tbaa !11
  store i32 %5, ptr %14, align 4, !tbaa !11
  %32 = zext i1 %6 to i8
  store i8 %32, ptr %15, align 1, !tbaa !13
  store ptr %7, ptr %16, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8
  %34 = load i32, ptr %12, align 4, !tbaa !11
  %35 = lshr i32 %34, 24
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %8
  br label %163

38:                                               ; preds = %8
  %39 = load atomic i8, ptr @_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx acquire, align 8
  %40 = icmp eq i8 %39, 0
  br i1 %40, label %41, label %51, !prof !15

41:                                               ; preds = %38
  %42 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx) #3
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %51

44:                                               ; preds = %41
  br label %45

45:                                               ; preds = %47, %44
  %46 = phi ptr [ @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, %44 ], [ %48, %47 ]
  invoke void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %46)
          to label %47 unwind label %59

47:                                               ; preds = %45
  %48 = getelementptr inbounds %struct.ImVec2, ptr %46, i64 1
  %49 = icmp eq ptr %48, getelementptr inbounds (%struct.ImVec2, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 12)
  br i1 %49, label %50, label %45

50:                                               ; preds = %47
  call void @__cxa_guard_release(ptr @_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx) #3
  br label %51

51:                                               ; preds = %50, %41, %38
  %52 = load i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E17circle_vtx_builds, align 1, !tbaa !13, !range !16, !noundef !17
  %53 = trunc i8 %52 to i1
  br i1 %53, label %87, label %54

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 0, ptr %19, align 4, !tbaa !11
  br label %55

55:                                               ; preds = %83, %54
  %56 = load i32, ptr %19, align 4, !tbaa !11
  %57 = icmp slt i32 %56, 12
  br i1 %57, label %63, label %58

58:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %86

59:                                               ; preds = %45
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %17, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %18, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx) #3
  br label %164

63:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %64 = load i32, ptr %19, align 4, !tbaa !11
  %65 = sitofp i32 %64 to float
  %66 = fdiv float %65, 1.200000e+01
  %67 = fmul float %66, 2.000000e+00
  %68 = fmul float %67, 0x400921FB60000000
  store float %68, ptr %20, align 4, !tbaa !9
  %69 = load float, ptr %20, align 4, !tbaa !9
  %70 = fadd float %69, 0x400921FB60000000
  %71 = call float @cosf(float noundef %70) #3
  %72 = load i32, ptr %19, align 4, !tbaa !11
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.ImVec2, ptr %74, i32 0, i32 0
  store float %71, ptr %75, align 8, !tbaa !18
  %76 = load float, ptr %20, align 4, !tbaa !9
  %77 = fadd float %76, 0x400921FB60000000
  %78 = call float @sinf(float noundef %77) #3
  %79 = load i32, ptr %19, align 4, !tbaa !11
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %80
  %82 = getelementptr inbounds %struct.ImVec2, ptr %81, i32 0, i32 1
  store float %78, ptr %82, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  br label %83

83:                                               ; preds = %63
  %84 = load i32, ptr %19, align 4, !tbaa !11
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %19, align 4, !tbaa !11
  br label %55, !llvm.loop !21

86:                                               ; preds = %58
  store i8 1, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E17circle_vtx_builds, align 1, !tbaa !13
  br label %87

87:                                               ; preds = %86, %51
  %88 = load i8, ptr %15, align 1, !tbaa !13, !range !16, !noundef !17
  %89 = trunc i8 %88 to i1
  br i1 %89, label %90, label %129

90:                                               ; preds = %87
  %91 = load i32, ptr %14, align 4, !tbaa !11
  %92 = load i32, ptr %13, align 4, !tbaa !11
  %93 = sub nsw i32 %91, %92
  %94 = mul i32 %93, 3
  call void @_ZN10ImDrawList15ReserveVerticesEj(ptr noundef nonnull align 8 dereferenceable(104) %33, i32 noundef %94)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %95 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %95, ptr %21, align 4, !tbaa !11
  br label %96

96:                                               ; preds = %125, %90
  %97 = load i32, ptr %21, align 4, !tbaa !11
  %98 = load i32, ptr %14, align 4, !tbaa !11
  %99 = icmp slt i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %128

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %103 = load i32, ptr %21, align 4, !tbaa !11
  %104 = srem i32 %103, 12
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %105
  %107 = load float, ptr %11, align 4, !tbaa !9
  %108 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %106, float noundef %107)
  store <2 x float> %108, ptr %23, align 4
  %109 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %102, ptr noundef nonnull align 4 dereferenceable(8) %23)
  store <2 x float> %109, ptr %22, align 4
  %110 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef nonnull align 4 dereferenceable(8) %22, i32 noundef %110)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %112 = load i32, ptr %21, align 4, !tbaa !11
  %113 = add nsw i32 %112, 1
  %114 = srem i32 %113, 12
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %115
  %117 = load float, ptr %11, align 4, !tbaa !9
  %118 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %116, float noundef %117)
  store <2 x float> %118, ptr %25, align 4
  %119 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %111, ptr noundef nonnull align 4 dereferenceable(8) %25)
  store <2 x float> %119, ptr %24, align 4
  %120 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef nonnull align 4 dereferenceable(8) %24, i32 noundef %120)
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = load ptr, ptr %16, align 8, !tbaa !5
  %123 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %121, ptr noundef nonnull align 4 dereferenceable(8) %122)
  store <2 x float> %123, ptr %26, align 4
  %124 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef nonnull align 4 dereferenceable(8) %26, i32 noundef %124)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  br label %125

125:                                              ; preds = %101
  %126 = load i32, ptr %21, align 4, !tbaa !11
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %21, align 4, !tbaa !11
  br label %96, !llvm.loop !23

128:                                              ; preds = %100
  br label %163

129:                                              ; preds = %87
  %130 = load i32, ptr %14, align 4, !tbaa !11
  %131 = load i32, ptr %13, align 4, !tbaa !11
  %132 = sub nsw i32 %130, %131
  %133 = mul i32 %132, 6
  call void @_ZN10ImDrawList15ReserveVerticesEj(ptr noundef nonnull align 8 dereferenceable(104) %33, i32 noundef %133)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  %134 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %134, ptr %27, align 4, !tbaa !11
  br label %135

135:                                              ; preds = %159, %129
  %136 = load i32, ptr %27, align 4, !tbaa !11
  %137 = load i32, ptr %14, align 4, !tbaa !11
  %138 = icmp slt i32 %136, %137
  br i1 %138, label %140, label %139

139:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  br label %162

140:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  %142 = load i32, ptr %27, align 4, !tbaa !11
  %143 = srem i32 %142, 12
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %144
  %146 = load float, ptr %11, align 4, !tbaa !9
  %147 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %145, float noundef %146)
  store <2 x float> %147, ptr %29, align 4
  %148 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %141, ptr noundef nonnull align 4 dereferenceable(8) %29)
  store <2 x float> %148, ptr %28, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %150 = load i32, ptr %27, align 4, !tbaa !11
  %151 = add nsw i32 %150, 1
  %152 = srem i32 %151, 12
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %153
  %155 = load float, ptr %11, align 4, !tbaa !9
  %156 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %154, float noundef %155)
  store <2 x float> %156, ptr %31, align 4
  %157 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %149, ptr noundef nonnull align 4 dereferenceable(8) %31)
  store <2 x float> %157, ptr %30, align 4
  %158 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN10ImDrawList10AddVtxLineERK6ImVec2S2_j(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 4 dereferenceable(8) %30, i32 noundef %158)
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  br label %159

159:                                              ; preds = %140
  %160 = load i32, ptr %27, align 4, !tbaa !11
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %27, align 4, !tbaa !11
  br label %135, !llvm.loop !24

162:                                              ; preds = %139
  br label %163

163:                                              ; preds = %162, %128, %37
  ret void

164:                                              ; preds = %59
  %165 = load ptr, ptr %17, align 8
  %166 = load i32, ptr %18, align 4
  %167 = insertvalue { ptr, i32 } poison, ptr %165, 0
  %168 = insertvalue { ptr, i32 } %167, i32 %166, 1
  resume { ptr, i32 } %168
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList15ReserveVerticesEj(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList10AddVtxLineERK6ImVec2S2_j(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) #4 align 2

; Function Attrs: nounwind
declare float @cosf(float noundef) #6

; Function Attrs: nounwind
declare float @sinf(float noundef) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #6 = { 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" }

!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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"branch_weights", i32 1, i32 1048575}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !10, i64 0}
!19 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!20 = !{!19, !10, i64 4}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}


; 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.ImVec2 = type { float, float }

@_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx = external hidden global [12 x %struct.ImVec2], align 16
@_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx = external hidden global i64, align 8
@_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E17circle_vtx_builds = external hidden local_unnamed_addr global i8, align 1

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8), float noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ImDrawList6AddArcERK6ImVec2fjiibS2_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, i1 noundef zeroext %6, ptr noundef nonnull align 4 dereferenceable(8) %7) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca %struct.ImVec2, align 8
  %10 = alloca %struct.ImVec2, align 8
  %11 = alloca %struct.ImVec2, align 8
  %12 = alloca %struct.ImVec2, align 8
  %13 = alloca %struct.ImVec2, align 8
  %14 = alloca %struct.ImVec2, align 8
  %15 = alloca %struct.ImVec2, align 8
  %16 = alloca %struct.ImVec2, align 8
  %17 = alloca %struct.ImVec2, align 8
  %18 = icmp ult i32 %3, 16777216
  br i1 %18, label %.loopexit, label %19

19:                                               ; preds = %8
  %20 = load atomic i8, ptr @_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx acquire, align 8
  %21 = icmp eq i8 %20, 0
  br i1 %21, label %22, label %24, !prof !5

22:                                               ; preds = %19
  %23 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx) #6
  %.not = icmp eq i32 %23, 0
  br i1 %.not, label %24, label %.preheader43.preheader

.preheader43.preheader:                           ; preds = %22
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx)
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 8))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 16))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 24))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 32))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 40))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 48))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 56))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 64))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 72))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 80))
  tail call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 88))
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx) #6
  br label %24

24:                                               ; preds = %.preheader43.preheader, %22, %19
  %25 = load i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E17circle_vtx_builds, align 1, !tbaa !6, !range !10, !noundef !11
  %26 = trunc nuw i8 %25 to i1
  br i1 %26, label %27, label %.preheader.preheader

.preheader.preheader:                             ; preds = %24
  store <4 x float> <float -1.000000e+00, float 0xBE7777A5C0000000, float 0xBFEBB67AA0000000, float 0xBFE0000060000000>, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, align 16, !tbaa !12
  store <4 x float> <float 0xBFDFFFFFA0000000, float 0xBFEBB67B00000000, float 0x3E499BC5C0000000, float -1.000000e+00>, ptr getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 16), align 16, !tbaa !12
  store <4 x float> <float 0x3FDFFFFFA0000000, float 0xBFEBB67B00000000, float 0x3FEBB67AC0000000, float 0xBFE0000060000000>, ptr getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 32), align 16, !tbaa !12
  store <4 x float> <float 1.000000e+00, float 0x3E8777A5C0000000, float 0x3FEBB67AE0000000, float 0x3FE0000020000000>, ptr getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 48), align 16, !tbaa !12
  store <4 x float> <float 0x3FDFFFFE60000000, float 0x3FEBB67B60000000, float 0xBE96AAC7A0000000, float 1.000000e+00>, ptr getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 64), align 16, !tbaa !12
  store <4 x float> <float 0xBFE0000060000000, float 0x3FEBB67AA0000000, float 0xBFEBB67B00000000, float 0x3FDFFFFF80000000>, ptr getelementptr inbounds (i8, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 80), align 16, !tbaa !12
  store i8 1, ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E17circle_vtx_builds, align 1, !tbaa !6
  br label %27

27:                                               ; preds = %.preheader.preheader, %24
  %28 = sub nsw i32 %5, %4
  %29 = icmp slt i32 %4, %5
  br i1 %6, label %30, label %44

30:                                               ; preds = %27
  %31 = mul i32 %28, 3
  tail call void @_ZN10ImDrawList15ReserveVerticesEj(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %31)
  br i1 %29, label %.lr.ph47, label %.loopexit

.lr.ph47:                                         ; preds = %30, %.lr.ph47
  %.03946 = phi i32 [ %37, %.lr.ph47 ], [ %4, %30 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %32 = srem i32 %.03946, 12
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %33
  %35 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %34, float noundef %2)
  store <2 x float> %35, ptr %10, align 8
  %36 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %36, ptr %9, align 8
  call void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 4 dereferenceable(8) %9, i32 noundef %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  %37 = add i32 %.03946, 1
  %38 = srem i32 %37, 12
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %39
  %41 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %40, float noundef %2)
  store <2 x float> %41, ptr %12, align 8
  %42 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %12)
  store <2 x float> %42, ptr %11, align 8
  call void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 4 dereferenceable(8) %11, i32 noundef %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %43 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store <2 x float> %43, ptr %13, align 8
  call void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 4 dereferenceable(8) %13, i32 noundef %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %exitcond50.not = icmp eq i32 %37, %5
  br i1 %exitcond50.not, label %.loopexit, label %.lr.ph47, !llvm.loop !14

44:                                               ; preds = %27
  %45 = mul i32 %28, 6
  tail call void @_ZN10ImDrawList15ReserveVerticesEj(ptr noundef nonnull align 8 dereferenceable(104) %0, i32 noundef %45)
  br i1 %29, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %44, %.lr.ph
  %.045 = phi i32 [ %51, %.lr.ph ], [ %4, %44 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %46 = srem i32 %.045, 12
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %47
  %49 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %48, float noundef %2)
  store <2 x float> %49, ptr %15, align 8
  %50 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store <2 x float> %50, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #6
  %51 = add i32 %.045, 1
  %52 = srem i32 %51, 12
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [12 x %struct.ImVec2], ptr @_ZZN10ImDrawList6AddArcERK6ImVec2fjiibS2_E10circle_vtx, i64 0, i64 %53
  %55 = call <2 x float> @_ZmlRK6ImVec2f(ptr noundef nonnull align 4 dereferenceable(8) %54, float noundef %2)
  store <2 x float> %55, ptr %17, align 8
  %56 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %17)
  store <2 x float> %56, ptr %16, align 8
  call void @_ZN10ImDrawList10AddVtxLineERK6ImVec2S2_j(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %16, i32 noundef %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  %exitcond.not = icmp eq i32 %51, %5
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !16

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph47, %44, %30, %8
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList15ReserveVerticesEj(ptr noundef nonnull align 8 dereferenceable(104), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN10ImDrawList6AddVtxERK6ImVec2j(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList10AddVtxLineERK6ImVec2S2_j(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef) local_unnamed_addr #4 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 = { nofree nounwind }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #6 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{i8 0, i8 2}
!11 = !{}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


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