; LLVM IR from learn-computer-graphics/physics :: libs/imgui/imgui_draw.ll (ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii)

; 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 }
%struct.ImDrawList = type <{ %struct.ImVector, %struct.ImVector.0, %struct.ImVector.1, i32, i32, ptr, ptr, ptr, ptr, %struct.ImVector.2, %struct.ImVector.3, %struct.ImVector.4, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, float, [4 x i8] }>
%struct.ImVector = type { i32, i32, ptr }
%struct.ImVector.0 = type { i32, i32, ptr }
%struct.ImVector.1 = type { i32, i32, ptr }
%struct.ImVector.2 = type { i32, i32, ptr }
%struct.ImVector.3 = type { i32, i32, ptr }
%struct.ImVector.4 = type { i32, i32, ptr }
%struct.ImDrawCmdHeader = type <{ %struct.ImVec4, ptr, i32, [4 x i8] }>
%struct.ImVec4 = type { float, float, float, float }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.5 }
%struct.ImVector.5 = type { i32, i32, ptr }
%struct.ImDrawListSharedData = type { %struct.ImVec2, ptr, float, float, float, %struct.ImVec4, i32, [48 x %struct.ImVec2], float, [64 x i8], ptr }

@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii = external hidden unnamed_addr constant [72 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; 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) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL7ImClampIiET_S0_S0_S0_(i32 noundef, i32 noundef, i32 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196), float noundef) #5 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) #5 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %struct.ImVec2, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store float %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !11
  store i32 %4, ptr %11, align 4, !tbaa !11
  store i32 %5, ptr %12, align 4, !tbaa !11
  %25 = load ptr, ptr %7, align 8
  %26 = load float, ptr %9, align 4, !tbaa !9
  %27 = fcmp ole float %26, 0.000000e+00
  br i1 %27, label %28, label %31

28:                                               ; preds = %6
  %29 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(8) %30)
  br label %202

31:                                               ; preds = %6
  %32 = load i32, ptr %10, align 4, !tbaa !11
  %33 = load i32, ptr %11, align 4, !tbaa !11
  %34 = icmp sle i32 %32, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %31
  br label %38

36:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 1040, ptr noundef @__PRETTY_FUNCTION__._ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii) #7
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  %39 = load i32, ptr %12, align 4, !tbaa !11
  %40 = icmp sle i32 %39, 0
  br i1 %40, label %41, label %45

41:                                               ; preds = %38
  %42 = load float, ptr %9, align 4, !tbaa !9
  %43 = call noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196) %25, float noundef %42)
  %44 = sdiv i32 48, %43
  store i32 %44, ptr %12, align 4, !tbaa !11
  br label %45

45:                                               ; preds = %41, %38
  %46 = load i32, ptr %12, align 4, !tbaa !11
  %47 = call noundef i32 @_ZL7ImClampIiET_S0_S0_S0_(i32 noundef %46, i32 noundef 1, i32 noundef 12)
  store i32 %47, ptr %12, align 4, !tbaa !11
  %48 = load i32, ptr %10, align 4, !tbaa !11
  %49 = icmp slt i32 %48, 0
  br i1 %49, label %50, label %65

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %51 = load i32, ptr %10, align 4, !tbaa !11
  %52 = srem i32 %51, 48
  store i32 %52, ptr %13, align 4, !tbaa !11
  %53 = load i32, ptr %13, align 4, !tbaa !11
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %58

55:                                               ; preds = %50
  %56 = load i32, ptr %13, align 4, !tbaa !11
  %57 = add nsw i32 %56, 48
  store i32 %57, ptr %13, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %55, %50
  %59 = load i32, ptr %13, align 4, !tbaa !11
  %60 = load i32, ptr %10, align 4, !tbaa !11
  %61 = sub nsw i32 %59, %60
  %62 = load i32, ptr %11, align 4, !tbaa !11
  %63 = add nsw i32 %62, %61
  store i32 %63, ptr %11, align 4, !tbaa !11
  %64 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %64, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %65

65:                                               ; preds = %58, %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %66 = load i32, ptr %11, align 4, !tbaa !11
  %67 = load i32, ptr %10, align 4, !tbaa !11
  %68 = sub nsw i32 %66, %67
  store i32 %68, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %69 = load i32, ptr %12, align 4, !tbaa !11
  store i32 %69, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %70 = load i32, ptr %14, align 4, !tbaa !11
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #8
  store i8 0, ptr %17, align 1, !tbaa !13
  %72 = load i32, ptr %12, align 4, !tbaa !11
  %73 = icmp sgt i32 %72, 1
  br i1 %73, label %74, label %98

74:                                               ; preds = %65
  %75 = load i32, ptr %14, align 4, !tbaa !11
  %76 = load i32, ptr %12, align 4, !tbaa !11
  %77 = sdiv i32 %75, %76
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %79 = load i32, ptr %14, align 4, !tbaa !11
  %80 = load i32, ptr %12, align 4, !tbaa !11
  %81 = srem i32 %79, %80
  store i32 %81, ptr %18, align 4, !tbaa !11
  %82 = load i32, ptr %18, align 4, !tbaa !11
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %84, label %97

84:                                               ; preds = %74
  store i8 1, ptr %17, align 1, !tbaa !13
  %85 = load i32, ptr %16, align 4, !tbaa !11
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %16, align 4, !tbaa !11
  %87 = load i32, ptr %14, align 4, !tbaa !11
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %89, label %96

89:                                               ; preds = %84
  %90 = load i32, ptr %12, align 4, !tbaa !11
  %91 = load i32, ptr %18, align 4, !tbaa !11
  %92 = sub nsw i32 %90, %91
  %93 = sdiv i32 %92, 2
  %94 = load i32, ptr %12, align 4, !tbaa !11
  %95 = sub nsw i32 %94, %93
  store i32 %95, ptr %12, align 4, !tbaa !11
  br label %96

96:                                               ; preds = %89, %84
  br label %97

97:                                               ; preds = %96, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %98

98:                                               ; preds = %97, %65
  %99 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  %100 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  %101 = getelementptr inbounds %struct.ImVector.4, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !15
  %103 = load i32, ptr %16, align 4, !tbaa !11
  %104 = add nsw i32 %102, %103
  call void @_ZN8ImVectorI6ImVec2E6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %99, i32 noundef %104)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %105 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  %106 = getelementptr inbounds %struct.ImVector.4, ptr %105, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !27
  %108 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  %109 = getelementptr inbounds %struct.ImVector.4, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 8, !tbaa !15
  %111 = load i32, ptr %16, align 4, !tbaa !11
  %112 = sub nsw i32 %110, %111
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds %struct.ImVec2, ptr %107, i64 %113
  store ptr %114, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %115 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %115, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  %116 = load i32, ptr %10, align 4, !tbaa !11
  store i32 %116, ptr %21, align 4, !tbaa !11
  br label %117

117:                                              ; preds = %155, %98
  %118 = load i32, ptr %21, align 4, !tbaa !11
  %119 = load i32, ptr %11, align 4, !tbaa !11
  %120 = icmp sle i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %163

122:                                              ; preds = %117
  %123 = load i32, ptr %20, align 4, !tbaa !11
  %124 = icmp sge i32 %123, 48
  br i1 %124, label %125, label %128

125:                                              ; preds = %122
  %126 = load i32, ptr %20, align 4, !tbaa !11
  %127 = sub nsw i32 %126, 48
  store i32 %127, ptr %20, align 4, !tbaa !11
  br label %128

128:                                              ; preds = %125, %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %129 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 5
  %130 = load ptr, ptr %129, align 8, !tbaa !28
  %131 = getelementptr inbounds %struct.ImDrawListSharedData, ptr %130, i32 0, i32 7
  %132 = load i32, ptr %20, align 4, !tbaa !11
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [48 x %struct.ImVec2], ptr %131, i64 0, i64 %133
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %134, i64 8, i1 false), !tbaa.struct !29
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.ImVec2, ptr %135, i32 0, i32 0
  %137 = load float, ptr %136, align 4, !tbaa !30
  %138 = getelementptr inbounds %struct.ImVec2, ptr %22, i32 0, i32 0
  %139 = load float, ptr %138, align 4, !tbaa !30
  %140 = load float, ptr %9, align 4, !tbaa !9
  %141 = call float @llvm.fmuladd.f32(float %139, float %140, float %137)
  %142 = load ptr, ptr %19, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ImVec2, ptr %142, i32 0, i32 0
  store float %141, ptr %143, align 4, !tbaa !30
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.ImVec2, ptr %144, i32 0, i32 1
  %146 = load float, ptr %145, align 4, !tbaa !32
  %147 = getelementptr inbounds %struct.ImVec2, ptr %22, i32 0, i32 1
  %148 = load float, ptr %147, align 4, !tbaa !32
  %149 = load float, ptr %9, align 4, !tbaa !9
  %150 = call float @llvm.fmuladd.f32(float %148, float %149, float %146)
  %151 = load ptr, ptr %19, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ImVec2, ptr %151, i32 0, i32 1
  store float %150, ptr %152, align 4, !tbaa !32
  %153 = load ptr, ptr %19, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ImVec2, ptr %153, i32 1
  store ptr %154, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %155

155:                                              ; preds = %128
  %156 = load i32, ptr %12, align 4, !tbaa !11
  %157 = load i32, ptr %21, align 4, !tbaa !11
  %158 = add nsw i32 %157, %156
  store i32 %158, ptr %21, align 4, !tbaa !11
  %159 = load i32, ptr %12, align 4, !tbaa !11
  %160 = load i32, ptr %20, align 4, !tbaa !11
  %161 = add nsw i32 %160, %159
  store i32 %161, ptr %20, align 4, !tbaa !11
  %162 = load i32, ptr %15, align 4, !tbaa !11
  store i32 %162, ptr %12, align 4, !tbaa !11
  br label %117, !llvm.loop !33

163:                                              ; preds = %121
  %164 = load i8, ptr %17, align 1, !tbaa !13, !range !35, !noundef !36
  %165 = trunc i8 %164 to i1
  br i1 %165, label %166, label %201

166:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  %167 = load i32, ptr %11, align 4, !tbaa !11
  %168 = srem i32 %167, 48
  store i32 %168, ptr %23, align 4, !tbaa !11
  %169 = load i32, ptr %23, align 4, !tbaa !11
  %170 = icmp slt i32 %169, 0
  br i1 %170, label %171, label %174

171:                                              ; preds = %166
  %172 = load i32, ptr %23, align 4, !tbaa !11
  %173 = add nsw i32 %172, 48
  store i32 %173, ptr %23, align 4, !tbaa !11
  br label %174

174:                                              ; preds = %171, %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %175 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 5
  %176 = load ptr, ptr %175, align 8, !tbaa !28
  %177 = getelementptr inbounds %struct.ImDrawListSharedData, ptr %176, i32 0, i32 7
  %178 = load i32, ptr %23, align 4, !tbaa !11
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [48 x %struct.ImVec2], ptr %177, i64 0, i64 %179
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 8 %180, i64 8, i1 false), !tbaa.struct !29
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.ImVec2, ptr %181, i32 0, i32 0
  %183 = load float, ptr %182, align 4, !tbaa !30
  %184 = getelementptr inbounds %struct.ImVec2, ptr %24, i32 0, i32 0
  %185 = load float, ptr %184, align 4, !tbaa !30
  %186 = load float, ptr %9, align 4, !tbaa !9
  %187 = call float @llvm.fmuladd.f32(float %185, float %186, float %183)
  %188 = load ptr, ptr %19, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.ImVec2, ptr %188, i32 0, i32 0
  store float %187, ptr %189, align 4, !tbaa !30
  %190 = load ptr, ptr %8, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.ImVec2, ptr %190, i32 0, i32 1
  %192 = load float, ptr %191, align 4, !tbaa !32
  %193 = getelementptr inbounds %struct.ImVec2, ptr %24, i32 0, i32 1
  %194 = load float, ptr %193, align 4, !tbaa !32
  %195 = load float, ptr %9, align 4, !tbaa !9
  %196 = call float @llvm.fmuladd.f32(float %194, float %195, float %192)
  %197 = load ptr, ptr %19, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.ImVec2, ptr %197, i32 0, i32 1
  store float %196, ptr %198, align 4, !tbaa !32
  %199 = load ptr, ptr %19, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.ImVec2, ptr %199, i32 1
  store ptr %200, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %201

201:                                              ; preds = %174, %163
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  br label %202

202:                                              ; preds = %201, %28
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { inlinehint 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 #4 = { inlinehint 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"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 = !{!16, !12, i64 120}
!16 = !{!"_ZTS10ImDrawList", !17, i64 0, !18, i64 16, !19, i64 32, !12, i64 48, !12, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !20, i64 88, !21, i64 104, !22, i64 120, !23, i64 136, !25, i64 168, !10, i64 192}
!17 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !6, i64 8}
!18 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !6, i64 8}
!19 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !6, i64 8}
!20 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !6, i64 8}
!21 = !{!"_ZTS8ImVectorIPvE", !12, i64 0, !12, i64 4, !6, i64 8}
!22 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !6, i64 8}
!23 = !{!"_ZTS15ImDrawCmdHeader", !24, i64 0, !6, i64 16, !12, i64 24}
!24 = !{!"_ZTS6ImVec4", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!25 = !{!"_ZTS18ImDrawListSplitter", !12, i64 0, !12, i64 4, !26, i64 8}
!26 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !6, i64 8}
!27 = !{!16, !6, i64 128}
!28 = !{!16, !6, i64 56}
!29 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}
!30 = !{!31, !10, i64 0}
!31 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!32 = !{!31, !10, i64 4}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{i8 0, i8 2}
!36 = !{}


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

@.str.1 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii = external hidden unnamed_addr constant [72 x i8], align 1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL7ImClampIiET_S0_S0_S0_(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI6ImVec2E6resizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196), float noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #3 align 2 {
  %.nonneg = sub i32 0, %3
  %7 = fcmp ugt float %2, 0.000000e+00
  br i1 %7, label %10, label %8

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %0, i64 120
  tail call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(8) %1)
  br label %90

10:                                               ; preds = %6
  %.not = icmp sgt i32 %3, %4
  br i1 %.not, label %11, label %12

11:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 1040, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii) #5
  unreachable

12:                                               ; preds = %10
  %13 = icmp slt i32 %5, 1
  br i1 %13, label %14, label %17

14:                                               ; preds = %12
  %15 = tail call noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196) %0, float noundef %2)
  %16 = sdiv i32 48, %15
  br label %17

17:                                               ; preds = %14, %12
  %.067 = phi i32 [ %16, %14 ], [ %5, %12 ]
  %18 = tail call noundef i32 @_ZL7ImClampIiET_S0_S0_S0_(i32 noundef %.067, i32 noundef 1, i32 noundef 12)
  %19 = icmp slt i32 %3, 0
  br i1 %19, label %20, label %25

20:                                               ; preds = %17
  %21 = urem i32 %.nonneg, 48
  %.not92 = icmp eq i32 %21, 0
  %22 = sub nuw nsw i32 48, %21
  %spec.select = select i1 %.not92, i32 0, i32 %22
  %23 = sub i32 %4, %3
  %24 = add i32 %23, %spec.select
  br label %25

25:                                               ; preds = %20, %17
  %.065 = phi i32 [ %24, %20 ], [ %4, %17 ]
  %.0 = phi i32 [ %spec.select, %20 ], [ %3, %17 ]
  %26 = sub nsw i32 %.065, %.0
  %27 = add nsw i32 %26, 1
  %28 = icmp sgt i32 %18, 1
  br i1 %28, label %29, label %40

29:                                               ; preds = %25
  %30 = sdiv i32 %26, %18
  %31 = add nsw i32 %30, 1
  %32 = srem i32 %26, %18
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %34, label %40

34:                                               ; preds = %29
  %35 = add nsw i32 %30, 2
  %36 = icmp sgt i32 %26, 0
  br i1 %36, label %37, label %40

37:                                               ; preds = %34
  %38 = sub nsw i32 %18, %32
  %.neg = sdiv i32 %38, -2
  %39 = add i32 %.neg, %18
  br label %40

40:                                               ; preds = %29, %37, %34, %25
  %.176 = phi i1 [ false, %25 ], [ true, %34 ], [ true, %37 ], [ false, %29 ]
  %.174 = phi i32 [ %27, %25 ], [ %35, %34 ], [ %35, %37 ], [ %31, %29 ]
  %.2 = phi i32 [ %18, %25 ], [ %18, %34 ], [ %39, %37 ], [ %18, %29 ]
  %41 = getelementptr inbounds i8, ptr %0, i64 120
  %42 = load i32, ptr %41, align 8, !tbaa !5
  %43 = add nsw i32 %42, %.174
  tail call void @_ZN8ImVectorI6ImVec2E6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %41, i32 noundef %43)
  %44 = getelementptr inbounds i8, ptr %0, i64 128
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = load i32, ptr %41, align 8, !tbaa !5
  %47 = sub nsw i32 %46, %.174
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %struct.ImVec2, ptr %45, i64 %48
  %.not8893 = icmp sgt i32 %.0, %.065
  br i1 %.not8893, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %40
  %50 = getelementptr inbounds i8, ptr %0, i64 56
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  %52 = getelementptr inbounds i8, ptr %51, i64 48
  %53 = icmp ugt i32 %.0, 47
  %54 = add nsw i32 %.0, -48
  %spec.select89.peel = select i1 %53, i32 %54, i32 %.0
  %55 = sext i32 %spec.select89.peel to i64
  %56 = getelementptr inbounds [48 x %struct.ImVec2], ptr %52, i64 0, i64 %55
  %57 = load <2 x float>, ptr %56, align 8, !tbaa !24
  %58 = load <2 x float>, ptr %1, align 4, !tbaa !24
  %59 = insertelement <2 x float> poison, float %2, i64 0
  %60 = shufflevector <2 x float> %59, <2 x float> poison, <2 x i32> zeroinitializer
  %61 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %57, <2 x float> %60, <2 x float> %58)
  store <2 x float> %61, ptr %49, align 4, !tbaa !24
  %62 = getelementptr inbounds i8, ptr %49, i64 8
  %63 = add nsw i32 %.2, %.0
  %.not88.peel = icmp sgt i32 %63, %.065
  br i1 %.not88.peel, label %._crit_edge, label %.peel.next

.peel.next:                                       ; preds = %.lr.ph
  %64 = add nsw i32 %spec.select89.peel, %.2
  br label %65

._crit_edge:                                      ; preds = %65, %.lr.ph, %40
  %.072.lcssa = phi ptr [ %49, %40 ], [ %62, %.lr.ph ], [ %73, %65 ]
  br i1 %.176, label %76, label %90

65:                                               ; preds = %.peel.next, %65
  %.06996 = phi i32 [ %63, %.peel.next ], [ %74, %65 ]
  %.07095 = phi i32 [ %64, %.peel.next ], [ %75, %65 ]
  %.07294 = phi ptr [ %62, %.peel.next ], [ %73, %65 ]
  %66 = icmp sgt i32 %.07095, 47
  %67 = add nsw i32 %.07095, -48
  %spec.select89 = select i1 %66, i32 %67, i32 %.07095
  %68 = sext i32 %spec.select89 to i64
  %69 = getelementptr inbounds [48 x %struct.ImVec2], ptr %52, i64 0, i64 %68
  %70 = load <2 x float>, ptr %69, align 8, !tbaa !24
  %71 = load <2 x float>, ptr %1, align 4, !tbaa !24
  %72 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %70, <2 x float> %60, <2 x float> %71)
  store <2 x float> %72, ptr %.07294, align 4, !tbaa !24
  %73 = getelementptr inbounds i8, ptr %.07294, i64 8
  %74 = add nsw i32 %18, %.06996
  %75 = add nsw i32 %spec.select89, %18
  %.not88 = icmp sgt i32 %74, %.065
  br i1 %.not88, label %._crit_edge, label %65, !llvm.loop !25

76:                                               ; preds = %._crit_edge
  %77 = srem i32 %.065, 48
  %78 = icmp slt i32 %77, 0
  %79 = add nsw i32 %77, 48
  %spec.select90 = select i1 %78, i32 %79, i32 %77
  %80 = getelementptr inbounds i8, ptr %0, i64 56
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = getelementptr inbounds i8, ptr %81, i64 48
  %83 = zext nneg i32 %spec.select90 to i64
  %84 = getelementptr inbounds [48 x %struct.ImVec2], ptr %82, i64 0, i64 %83
  %85 = load <2 x float>, ptr %84, align 8, !tbaa !24
  %86 = load <2 x float>, ptr %1, align 4, !tbaa !24
  %87 = insertelement <2 x float> poison, float %2, i64 0
  %88 = shufflevector <2 x float> %87, <2 x float> poison, <2 x i32> zeroinitializer
  %89 = tail call <2 x float> @llvm.fmuladd.v2f32(<2 x float> %85, <2 x float> %88, <2 x float> %86)
  store <2 x float> %89, ptr %.072.lcssa, align 4, !tbaa !24
  br label %90

90:                                               ; preds = %._crit_edge, %76, %8
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x float> @llvm.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>) #4

attributes #0 = { 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 #1 = { inlinehint 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 = { inlinehint 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 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !8, i64 120}
!6 = !{!"_ZTS10ImDrawList", !7, i64 0, !12, i64 16, !13, i64 32, !8, i64 48, !8, i64 52, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !14, i64 88, !15, i64 104, !16, i64 120, !17, i64 136, !20, i64 168, !19, i64 192}
!7 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !8, i64 0, !8, i64 4, !11, i64 8}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"_ZTS8ImVectorItE", !8, i64 0, !8, i64 4, !11, i64 8}
!13 = !{!"_ZTS8ImVectorI10ImDrawVertE", !8, i64 0, !8, i64 4, !11, i64 8}
!14 = !{!"_ZTS8ImVectorI6ImVec4E", !8, i64 0, !8, i64 4, !11, i64 8}
!15 = !{!"_ZTS8ImVectorIPvE", !8, i64 0, !8, i64 4, !11, i64 8}
!16 = !{!"_ZTS8ImVectorI6ImVec2E", !8, i64 0, !8, i64 4, !11, i64 8}
!17 = !{!"_ZTS15ImDrawCmdHeader", !18, i64 0, !11, i64 16, !8, i64 24}
!18 = !{!"_ZTS6ImVec4", !19, i64 0, !19, i64 4, !19, i64 8, !19, i64 12}
!19 = !{!"float", !9, i64 0}
!20 = !{!"_ZTS18ImDrawListSplitter", !8, i64 0, !8, i64 4, !21, i64 8}
!21 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !8, i64 0, !8, i64 4, !11, i64 8}
!22 = !{!6, !11, i64 128}
!23 = !{!6, !11, i64 56}
!24 = !{!19, !19, i64 0}
!25 = distinct !{!25, !26, !27}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass