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

; 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.5 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZN10ImDrawList9PathArcToERK6ImVec2fffi = external hidden unnamed_addr constant [69 x i8], align 1

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10ImDrawList9PathArcToERK6ImVec2fffi(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, float noundef %3, float 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 float, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca %struct.ImVec2, align 4
  %21 = alloca %struct.ImVec2, align 4
  %22 = alloca float, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, 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 float %3, ptr %10, align 4, !tbaa !9
  store float %4, ptr %11, align 4, !tbaa !9
  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 %174

31:                                               ; preds = %6
  %32 = load float, ptr %10, align 4, !tbaa !9
  %33 = load float, ptr %11, align 4, !tbaa !9
  %34 = fcmp ole float %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.5, ptr noundef @.str.1, i32 noundef 1150, ptr noundef @__PRETTY_FUNCTION__._ZN10ImDrawList9PathArcToERK6ImVec2fffi) #8
  unreachable

37:                                               ; No predecessors!
  br label %38

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

41:                                               ; preds = %38
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = load float, ptr %9, align 4, !tbaa !9
  %44 = load float, ptr %10, align 4, !tbaa !9
  %45 = load float, ptr %11, align 4, !tbaa !9
  %46 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN10ImDrawList11_PathArcToNERK6ImVec2fffi(ptr noundef nonnull align 8 dereferenceable(196) %25, ptr noundef nonnull align 4 dereferenceable(8) %42, float noundef %43, float noundef %44, float noundef %45, i32 noundef %46)
  br label %174

47:                                               ; preds = %38
  %48 = load float, ptr %9, align 4, !tbaa !9
  %49 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 5
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  %51 = getelementptr inbounds %struct.ImDrawListSharedData, ptr %50, i32 0, i32 8
  %52 = load float, ptr %51, align 8, !tbaa !25
  %53 = fcmp ole float %48, %52
  br i1 %53, label %54, label %152

54:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %55 = load float, ptr %10, align 4, !tbaa !9
  %56 = fmul float 4.800000e+01, %55
  %57 = fdiv float %56, 0x401921FB60000000
  %58 = call float @llvm.ceil.f32(float %57)
  %59 = fptosi float %58 to i32
  store i32 %59, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %60 = load float, ptr %11, align 4, !tbaa !9
  %61 = fmul float 4.800000e+01, %60
  %62 = fdiv float %61, 0x401921FB60000000
  %63 = fptosi float %62 to i32
  store i32 %63, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  %64 = load i32, ptr %14, align 4, !tbaa !11
  %65 = load i32, ptr %13, align 4, !tbaa !11
  %66 = sub nsw i32 %64, %65
  %67 = call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %66, i32 noundef 0)
  store i32 %67, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  %68 = load i32, ptr %13, align 4, !tbaa !11
  %69 = sitofp i32 %68 to float
  %70 = fmul float %69, 0x400921FB60000000
  %71 = fmul float %70, 2.000000e+00
  %72 = fdiv float %71, 4.800000e+01
  store float %72, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #9
  %73 = load i32, ptr %14, align 4, !tbaa !11
  %74 = sitofp i32 %73 to float
  %75 = fmul float %74, 0x400921FB60000000
  %76 = fmul float %75, 2.000000e+00
  %77 = fdiv float %76, 4.800000e+01
  store float %77, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #9
  %78 = load float, ptr %16, align 4, !tbaa !9
  %79 = load float, ptr %10, align 4, !tbaa !9
  %80 = fsub float %78, %79
  %81 = fcmp ogt float %80, 0.000000e+00
  %82 = zext i1 %81 to i8
  store i8 %82, ptr %18, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #9
  %83 = load float, ptr %11, align 4, !tbaa !9
  %84 = load float, ptr %17, align 4, !tbaa !9
  %85 = fsub float %83, %84
  %86 = fcmp ogt float %85, 0.000000e+00
  %87 = zext i1 %86 to i8
  store i8 %87, ptr %19, align 1, !tbaa !28
  %88 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  %89 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  %90 = getelementptr inbounds %struct.ImVector.4, ptr %89, i32 0, i32 0
  %91 = load i32, ptr %90, align 8, !tbaa !30
  %92 = load i32, ptr %15, align 4, !tbaa !11
  %93 = add nsw i32 %92, 1
  %94 = load i8, ptr %18, align 1, !tbaa !28, !range !31, !noundef !32
  %95 = trunc i8 %94 to i1
  %96 = zext i1 %95 to i64
  %97 = select i1 %95, i32 1, i32 0
  %98 = add nsw i32 %93, %97
  %99 = load i8, ptr %19, align 1, !tbaa !28, !range !31, !noundef !32
  %100 = trunc i8 %99 to i1
  %101 = zext i1 %100 to i64
  %102 = select i1 %100, i32 1, i32 0
  %103 = add nsw i32 %98, %102
  %104 = add nsw i32 %91, %103
  call void @_ZN8ImVectorI6ImVec2E7reserveEi(ptr noundef nonnull align 8 dereferenceable(16) %88, i32 noundef %104)
  %105 = load i8, ptr %18, align 1, !tbaa !28, !range !31, !noundef !32
  %106 = trunc i8 %105 to i1
  br i1 %106, label %107, label %123

107:                                              ; preds = %54
  %108 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ImVec2, ptr %109, i32 0, i32 0
  %111 = load float, ptr %110, align 4, !tbaa !33
  %112 = load float, ptr %10, align 4, !tbaa !9
  %113 = call float @cosf(float noundef %112) #9
  %114 = load float, ptr %9, align 4, !tbaa !9
  %115 = call float @llvm.fmuladd.f32(float %113, float %114, float %111)
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ImVec2, ptr %116, i32 0, i32 1
  %118 = load float, ptr %117, align 4, !tbaa !34
  %119 = load float, ptr %10, align 4, !tbaa !9
  %120 = call float @sinf(float noundef %119) #9
  %121 = load float, ptr %9, align 4, !tbaa !9
  %122 = call float @llvm.fmuladd.f32(float %120, float %121, float %118)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %20, float noundef %115, float noundef %122)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %108, ptr noundef nonnull align 4 dereferenceable(8) %20)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  br label %123

123:                                              ; preds = %107, %54
  %124 = load i32, ptr %14, align 4, !tbaa !11
  %125 = load i32, ptr %13, align 4, !tbaa !11
  %126 = icmp sge i32 %124, %125
  br i1 %126, label %127, label %132

127:                                              ; preds = %123
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load float, ptr %9, align 4, !tbaa !9
  %130 = load i32, ptr %13, align 4, !tbaa !11
  %131 = load i32, ptr %14, align 4, !tbaa !11
  call void @_ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii(ptr noundef nonnull align 8 dereferenceable(196) %25, ptr noundef nonnull align 4 dereferenceable(8) %128, float noundef %129, i32 noundef %130, i32 noundef %131, i32 noundef 0)
  br label %132

132:                                              ; preds = %127, %123
  %133 = load i8, ptr %19, align 1, !tbaa !28, !range !31, !noundef !32
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %151

135:                                              ; preds = %132
  %136 = getelementptr inbounds %struct.ImDrawList, ptr %25, i32 0, i32 11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.ImVec2, ptr %137, i32 0, i32 0
  %139 = load float, ptr %138, align 4, !tbaa !33
  %140 = load float, ptr %11, align 4, !tbaa !9
  %141 = call float @cosf(float noundef %140) #9
  %142 = load float, ptr %9, align 4, !tbaa !9
  %143 = call float @llvm.fmuladd.f32(float %141, float %142, float %139)
  %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 !34
  %147 = load float, ptr %11, align 4, !tbaa !9
  %148 = call float @sinf(float noundef %147) #9
  %149 = load float, ptr %9, align 4, !tbaa !9
  %150 = call float @llvm.fmuladd.f32(float %148, float %149, float %146)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %21, float noundef %143, float noundef %150)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %136, ptr noundef nonnull align 4 dereferenceable(8) %21)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  br label %151

151:                                              ; preds = %135, %132
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %174

152:                                              ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  %153 = load float, ptr %11, align 4, !tbaa !9
  %154 = load float, ptr %10, align 4, !tbaa !9
  %155 = fsub float %153, %154
  store float %155, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %156 = load float, ptr %9, align 4, !tbaa !9
  %157 = call noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196) %25, float noundef %156)
  store i32 %157, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #9
  %158 = load i32, ptr %23, align 4, !tbaa !11
  %159 = sitofp i32 %158 to float
  %160 = load float, ptr %22, align 4, !tbaa !9
  %161 = fmul float %159, %160
  %162 = fdiv float %161, 0x401921FB60000000
  %163 = call float @llvm.ceil.f32(float %162)
  %164 = fptosi float %163 to i32
  %165 = load float, ptr %22, align 4, !tbaa !9
  %166 = fdiv float 0x401921FB60000000, %165
  %167 = fptosi float %166 to i32
  %168 = call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %164, i32 noundef %167)
  store i32 %168, ptr %24, align 4, !tbaa !11
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = load float, ptr %9, align 4, !tbaa !9
  %171 = load float, ptr %10, align 4, !tbaa !9
  %172 = load float, ptr %11, align 4, !tbaa !9
  %173 = load i32, ptr %24, align 4, !tbaa !11
  call void @_ZN10ImDrawList11_PathArcToNERK6ImVec2fffi(ptr noundef nonnull align 8 dereferenceable(196) %25, ptr noundef nonnull align 4 dereferenceable(8) %169, float noundef %170, float noundef %171, float noundef %172, i32 noundef %173)
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %174

174:                                              ; preds = %152, %151, %41, %28
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #7 = { 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 #8 = { noreturn nounwind }
attributes #9 = { 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, !6, i64 56}
!14 = !{!"_ZTS10ImDrawList", !15, i64 0, !16, i64 16, !17, i64 32, !12, i64 48, !12, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !18, i64 88, !19, i64 104, !20, i64 120, !21, i64 136, !23, i64 168, !10, i64 192}
!15 = !{!"_ZTS8ImVectorI9ImDrawCmdE", !12, i64 0, !12, i64 4, !6, i64 8}
!16 = !{!"_ZTS8ImVectorItE", !12, i64 0, !12, i64 4, !6, i64 8}
!17 = !{!"_ZTS8ImVectorI10ImDrawVertE", !12, i64 0, !12, i64 4, !6, i64 8}
!18 = !{!"_ZTS8ImVectorI6ImVec4E", !12, i64 0, !12, i64 4, !6, i64 8}
!19 = !{!"_ZTS8ImVectorIPvE", !12, i64 0, !12, i64 4, !6, i64 8}
!20 = !{!"_ZTS8ImVectorI6ImVec2E", !12, i64 0, !12, i64 4, !6, i64 8}
!21 = !{!"_ZTS15ImDrawCmdHeader", !22, i64 0, !6, i64 16, !12, i64 24}
!22 = !{!"_ZTS6ImVec4", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!23 = !{!"_ZTS18ImDrawListSplitter", !12, i64 0, !12, i64 4, !24, i64 8}
!24 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !12, i64 0, !12, i64 4, !6, i64 8}
!25 = !{!26, !10, i64 432}
!26 = !{!"_ZTS20ImDrawListSharedData", !27, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !22, i64 28, !12, i64 44, !7, i64 48, !10, i64 432, !7, i64 436, !6, i64 504}
!27 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!28 = !{!29, !29, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!14, !12, i64 120}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = !{!27, !10, i64 0}
!34 = !{!27, !10, i64 4}


; 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.5 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__._ZN10ImDrawList9PathArcToERK6ImVec2fffi = external hidden unnamed_addr constant [69 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sinf(float noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #4

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

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

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

; 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 #6 align 2

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

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

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

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

12:                                               ; preds = %6
  %13 = fcmp ugt float %3, %4
  br i1 %13, label %14, label %15

14:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 1150, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN10ImDrawList9PathArcToERK6ImVec2fffi) #8
  unreachable

15:                                               ; preds = %12
  %16 = icmp sgt i32 %5, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %15
  tail call void @_ZN10ImDrawList11_PathArcToNERK6ImVec2fffi(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, float noundef %3, float noundef %4, i32 noundef %5)
  br label %81

18:                                               ; preds = %15
  %19 = getelementptr inbounds i8, ptr %0, i64 56
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 432
  %22 = load float, ptr %21, align 8, !tbaa !22
  %23 = fcmp ult float %22, %2
  br i1 %23, label %70, label %24

24:                                               ; preds = %18
  %25 = fmul float %3, 4.800000e+01
  %26 = fdiv float %25, 0x401921FB60000000
  %27 = tail call float @llvm.ceil.f32(float %26)
  %28 = fptosi float %27 to i32
  %29 = fmul float %4, 4.800000e+01
  %30 = fdiv float %29, 0x401921FB60000000
  %31 = fptosi float %30 to i32
  %32 = sub nsw i32 %31, %28
  %33 = tail call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %32, i32 noundef 0)
  %34 = sitofp i32 %28 to float
  %35 = fmul float %34, 0x400921FB60000000
  %36 = fmul float %35, 2.000000e+00
  %37 = fdiv float %36, 4.800000e+01
  %38 = sitofp i32 %31 to float
  %39 = fmul float %38, 0x400921FB60000000
  %40 = fmul float %39, 2.000000e+00
  %41 = fdiv float %40, 4.800000e+01
  %42 = fcmp ogt float %37, %3
  %43 = fcmp olt float %41, %4
  %44 = getelementptr inbounds i8, ptr %0, i64 120
  %45 = load i32, ptr %44, align 8, !tbaa !25
  %46 = zext i1 %43 to i32
  %47 = select i1 %42, i32 2, i32 1
  %48 = add nuw nsw i32 %47, %46
  %49 = add i32 %48, %33
  %50 = add nsw i32 %49, %45
  tail call void @_ZN8ImVectorI6ImVec2E7reserveEi(ptr noundef nonnull align 8 dereferenceable(16) %44, i32 noundef %50)
  br i1 %42, label %51, label %59

51:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %52 = load float, ptr %1, align 4, !tbaa !26
  %53 = tail call float @cosf(float noundef %3) #9
  %54 = tail call float @llvm.fmuladd.f32(float %53, float %2, float %52)
  %55 = getelementptr inbounds i8, ptr %1, i64 4
  %56 = load float, ptr %55, align 4, !tbaa !27
  %57 = tail call float @sinf(float noundef %3) #9
  %58 = tail call float @llvm.fmuladd.f32(float %57, float %2, float %56)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %54, float noundef %58)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %59

59:                                               ; preds = %51, %24
  %.not = icmp slt i32 %31, %28
  br i1 %.not, label %61, label %60

60:                                               ; preds = %59
  call void @_ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, i32 noundef %28, i32 noundef %31, i32 noundef 0)
  br label %61

61:                                               ; preds = %60, %59
  br i1 %43, label %62, label %81

62:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %63 = load float, ptr %1, align 4, !tbaa !26
  %64 = call float @cosf(float noundef %4) #9
  %65 = call float @llvm.fmuladd.f32(float %64, float %2, float %63)
  %66 = getelementptr inbounds i8, ptr %1, i64 4
  %67 = load float, ptr %66, align 4, !tbaa !27
  %68 = call float @sinf(float noundef %4) #9
  %69 = call float @llvm.fmuladd.f32(float %68, float %2, float %67)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %65, float noundef %69)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %81

70:                                               ; preds = %18
  %71 = fsub float %4, %3
  %72 = tail call noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196) %0, float noundef %2)
  %73 = sitofp i32 %72 to float
  %74 = fmul float %71, %73
  %75 = fdiv float %74, 0x401921FB60000000
  %76 = tail call float @llvm.ceil.f32(float %75)
  %77 = fptosi float %76 to i32
  %78 = fdiv float 0x401921FB60000000, %71
  %79 = fptosi float %78 to i32
  %80 = tail call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %77, i32 noundef %79)
  tail call void @_ZN10ImDrawList11_PathArcToNERK6ImVec2fffi(ptr noundef nonnull align 8 dereferenceable(196) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, float noundef %2, float noundef %3, float noundef %4, i32 noundef %80)
  br label %81

81:                                               ; preds = %61, %62, %70, %17, %10
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(write) "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #7 = { 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 #8 = { noreturn nounwind }
attributes #9 = { 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, !11, i64 56}
!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 = !{!23, !19, i64 432}
!23 = !{!"_ZTS20ImDrawListSharedData", !24, i64 0, !11, i64 8, !19, i64 16, !19, i64 20, !19, i64 24, !18, i64 28, !8, i64 44, !9, i64 48, !19, i64 432, !9, i64 436, !11, i64 504}
!24 = !{!"_ZTS6ImVec2", !19, i64 0, !19, i64 4}
!25 = !{!6, !8, i64 120}
!26 = !{!24, !19, i64 0}
!27 = !{!24, !19, i64 4}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass