; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/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.0, %struct.ImVector.1, %struct.ImVector.2, i32, i32, ptr, ptr, ptr, ptr, %struct.ImVector.3, %struct.ImVector.4, %struct.ImVector, %struct.ImDrawCmdHeader, %struct.ImDrawListSplitter, float, [4 x i8] }>
%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.ImVector = 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, %struct.ImVector, [48 x %struct.ImVec2], float, [64 x i8], ptr }

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #3

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI6ImVec2E7reserveEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #5 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) #4 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 i8, align 1
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca %struct.ImVec2, align 4
  %24 = alloca %struct.ImVec2, align 4
  %25 = alloca float, align 4
  %26 = alloca i32, align 4
  %27 = 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
  %28 = load ptr, ptr %7, align 8
  %29 = load float, ptr %9, align 4, !tbaa !9
  %30 = fcmp olt float %29, 5.000000e-01
  br i1 %30, label %31, label %34

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

34:                                               ; preds = %6
  %35 = load i32, ptr %12, align 4, !tbaa !11
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %37, label %43

37:                                               ; preds = %34
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = load float, ptr %9, align 4, !tbaa !9
  %40 = load float, ptr %10, align 4, !tbaa !9
  %41 = load float, ptr %11, align 4, !tbaa !9
  %42 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN10ImDrawList11_PathArcToNERK6ImVec2fffi(ptr noundef nonnull align 8 dereferenceable(196) %28, ptr noundef nonnull align 4 dereferenceable(8) %38, float noundef %39, float noundef %40, float noundef %41, i32 noundef %42)
  br label %207

43:                                               ; preds = %34
  %44 = load float, ptr %9, align 4, !tbaa !9
  %45 = getelementptr inbounds %struct.ImDrawList, ptr %28, i32 0, i32 5
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = getelementptr inbounds %struct.ImDrawListSharedData, ptr %46, i32 0, i32 9
  %48 = load float, ptr %47, align 8, !tbaa !25
  %49 = fcmp ole float %44, %48
  br i1 %49, label %50, label %184

50:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  %51 = load float, ptr %11, align 4, !tbaa !9
  %52 = load float, ptr %10, align 4, !tbaa !9
  %53 = fcmp olt float %51, %52
  %54 = zext i1 %53 to i8
  store i8 %54, ptr %13, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %55 = load float, ptr %10, align 4, !tbaa !9
  %56 = fmul float 4.800000e+01, %55
  %57 = fdiv float %56, 0x401921FB60000000
  store float %57, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %58 = load float, ptr %11, align 4, !tbaa !9
  %59 = fmul float 4.800000e+01, %58
  %60 = fdiv float %59, 0x401921FB60000000
  store float %60, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %61 = load i8, ptr %13, align 1, !tbaa !28, !range !30, !noundef !31
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %67

63:                                               ; preds = %50
  %64 = load float, ptr %14, align 4, !tbaa !9
  %65 = call noundef float @_ZL13ImFloorSignedf(float noundef %64)
  %66 = fptosi float %65 to i32
  br label %71

67:                                               ; preds = %50
  %68 = load float, ptr %14, align 4, !tbaa !9
  %69 = call float @llvm.ceil.f32(float %68)
  %70 = fptosi float %69 to i32
  br label %71

71:                                               ; preds = %67, %63
  %72 = phi i32 [ %66, %63 ], [ %70, %67 ]
  store i32 %72, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %73 = load i8, ptr %13, align 1, !tbaa !28, !range !30, !noundef !31
  %74 = trunc i8 %73 to i1
  br i1 %74, label %75, label %79

75:                                               ; preds = %71
  %76 = load float, ptr %15, align 4, !tbaa !9
  %77 = call float @llvm.ceil.f32(float %76)
  %78 = fptosi float %77 to i32
  br label %83

79:                                               ; preds = %71
  %80 = load float, ptr %15, align 4, !tbaa !9
  %81 = call noundef float @_ZL13ImFloorSignedf(float noundef %80)
  %82 = fptosi float %81 to i32
  br label %83

83:                                               ; preds = %79, %75
  %84 = phi i32 [ %78, %75 ], [ %82, %79 ]
  store i32 %84, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %85 = load i8, ptr %13, align 1, !tbaa !28, !range !30, !noundef !31
  %86 = trunc i8 %85 to i1
  br i1 %86, label %87, label %92

87:                                               ; preds = %83
  %88 = load i32, ptr %16, align 4, !tbaa !11
  %89 = load i32, ptr %17, align 4, !tbaa !11
  %90 = sub nsw i32 %88, %89
  %91 = call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %90, i32 noundef 0)
  br label %97

92:                                               ; preds = %83
  %93 = load i32, ptr %17, align 4, !tbaa !11
  %94 = load i32, ptr %16, align 4, !tbaa !11
  %95 = sub nsw i32 %93, %94
  %96 = call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %95, i32 noundef 0)
  br label %97

97:                                               ; preds = %92, %87
  %98 = phi i32 [ %91, %87 ], [ %96, %92 ]
  store i32 %98, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  %99 = load i32, ptr %16, align 4, !tbaa !11
  %100 = sitofp i32 %99 to float
  %101 = fmul float %100, 0x400921FB60000000
  %102 = fmul float %101, 2.000000e+00
  %103 = fdiv float %102, 4.800000e+01
  store float %103, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  %104 = load i32, ptr %17, align 4, !tbaa !11
  %105 = sitofp i32 %104 to float
  %106 = fmul float %105, 0x400921FB60000000
  %107 = fmul float %106, 2.000000e+00
  %108 = fdiv float %107, 4.800000e+01
  store float %108, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #7
  %109 = load float, ptr %19, align 4, !tbaa !9
  %110 = load float, ptr %10, align 4, !tbaa !9
  %111 = fsub float %109, %110
  %112 = call noundef float @_ZL5ImAbsf(float noundef %111)
  %113 = fcmp oge float %112, 0x3EE4F8B580000000
  %114 = zext i1 %113 to i8
  store i8 %114, ptr %21, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  %115 = load float, ptr %11, align 4, !tbaa !9
  %116 = load float, ptr %20, align 4, !tbaa !9
  %117 = fsub float %115, %116
  %118 = call noundef float @_ZL5ImAbsf(float noundef %117)
  %119 = fcmp oge float %118, 0x3EE4F8B580000000
  %120 = zext i1 %119 to i8
  store i8 %120, ptr %22, align 1, !tbaa !28
  %121 = getelementptr inbounds %struct.ImDrawList, ptr %28, i32 0, i32 11
  %122 = getelementptr inbounds %struct.ImDrawList, ptr %28, i32 0, i32 11
  %123 = getelementptr inbounds %struct.ImVector, ptr %122, i32 0, i32 0
  %124 = load i32, ptr %123, align 8, !tbaa !32
  %125 = load i32, ptr %18, align 4, !tbaa !11
  %126 = add nsw i32 %125, 1
  %127 = load i8, ptr %21, align 1, !tbaa !28, !range !30, !noundef !31
  %128 = trunc i8 %127 to i1
  %129 = zext i1 %128 to i64
  %130 = select i1 %128, i32 1, i32 0
  %131 = add nsw i32 %126, %130
  %132 = load i8, ptr %22, align 1, !tbaa !28, !range !30, !noundef !31
  %133 = trunc i8 %132 to i1
  %134 = zext i1 %133 to i64
  %135 = select i1 %133, i32 1, i32 0
  %136 = add nsw i32 %131, %135
  %137 = add nsw i32 %124, %136
  call void @_ZN8ImVectorI6ImVec2E7reserveEi(ptr noundef nonnull align 8 dereferenceable(16) %121, i32 noundef %137)
  %138 = load i8, ptr %21, align 1, !tbaa !28, !range !30, !noundef !31
  %139 = trunc i8 %138 to i1
  br i1 %139, label %140, label %156

140:                                              ; preds = %97
  %141 = getelementptr inbounds %struct.ImDrawList, ptr %28, i32 0, i32 11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.ImVec2, ptr %142, i32 0, i32 0
  %144 = load float, ptr %143, align 4, !tbaa !33
  %145 = load float, ptr %10, align 4, !tbaa !9
  %146 = call float @cosf(float noundef %145) #7
  %147 = load float, ptr %9, align 4, !tbaa !9
  %148 = call float @llvm.fmuladd.f32(float %146, float %147, float %144)
  %149 = load ptr, ptr %8, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.ImVec2, ptr %149, i32 0, i32 1
  %151 = load float, ptr %150, align 4, !tbaa !34
  %152 = load float, ptr %10, align 4, !tbaa !9
  %153 = call float @sinf(float noundef %152) #7
  %154 = load float, ptr %9, align 4, !tbaa !9
  %155 = call float @llvm.fmuladd.f32(float %153, float %154, float %151)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %23, float noundef %148, float noundef %155)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %141, ptr noundef nonnull align 4 dereferenceable(8) %23)
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %156

156:                                              ; preds = %140, %97
  %157 = load i32, ptr %18, align 4, !tbaa !11
  %158 = icmp sgt i32 %157, 0
  br i1 %158, label %159, label %164

159:                                              ; preds = %156
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load float, ptr %9, align 4, !tbaa !9
  %162 = load i32, ptr %16, align 4, !tbaa !11
  %163 = load i32, ptr %17, align 4, !tbaa !11
  call void @_ZN10ImDrawList16_PathArcToFastExERK6ImVec2fiii(ptr noundef nonnull align 8 dereferenceable(196) %28, ptr noundef nonnull align 4 dereferenceable(8) %160, float noundef %161, i32 noundef %162, i32 noundef %163, i32 noundef 0)
  br label %164

164:                                              ; preds = %159, %156
  %165 = load i8, ptr %22, align 1, !tbaa !28, !range !30, !noundef !31
  %166 = trunc i8 %165 to i1
  br i1 %166, label %167, label %183

167:                                              ; preds = %164
  %168 = getelementptr inbounds %struct.ImDrawList, ptr %28, i32 0, i32 11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.ImVec2, ptr %169, i32 0, i32 0
  %171 = load float, ptr %170, align 4, !tbaa !33
  %172 = load float, ptr %11, align 4, !tbaa !9
  %173 = call float @cosf(float noundef %172) #7
  %174 = load float, ptr %9, align 4, !tbaa !9
  %175 = call float @llvm.fmuladd.f32(float %173, float %174, float %171)
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.ImVec2, ptr %176, i32 0, i32 1
  %178 = load float, ptr %177, align 4, !tbaa !34
  %179 = load float, ptr %11, align 4, !tbaa !9
  %180 = call float @sinf(float noundef %179) #7
  %181 = load float, ptr %9, align 4, !tbaa !9
  %182 = call float @llvm.fmuladd.f32(float %180, float %181, float %178)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %24, float noundef %175, float noundef %182)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %168, ptr noundef nonnull align 4 dereferenceable(8) %24)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  br label %183

183:                                              ; preds = %167, %164
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  br label %207

184:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %185 = load float, ptr %11, align 4, !tbaa !9
  %186 = load float, ptr %10, align 4, !tbaa !9
  %187 = fsub float %185, %186
  %188 = call noundef float @_ZL5ImAbsf(float noundef %187)
  store float %188, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %189 = load float, ptr %9, align 4, !tbaa !9
  %190 = call noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196) %28, float noundef %189)
  store i32 %190, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %191 = load i32, ptr %26, align 4, !tbaa !11
  %192 = sitofp i32 %191 to float
  %193 = load float, ptr %25, align 4, !tbaa !9
  %194 = fmul float %192, %193
  %195 = fdiv float %194, 0x401921FB60000000
  %196 = call float @llvm.ceil.f32(float %195)
  %197 = fptosi float %196 to i32
  %198 = load float, ptr %25, align 4, !tbaa !9
  %199 = fdiv float 0x401921FB60000000, %198
  %200 = fptosi float %199 to i32
  %201 = call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %197, i32 noundef %200)
  store i32 %201, ptr %27, align 4, !tbaa !11
  %202 = load ptr, ptr %8, align 8, !tbaa !5
  %203 = load float, ptr %9, align 4, !tbaa !9
  %204 = load float, ptr %10, align 4, !tbaa !9
  %205 = load float, ptr %11, align 4, !tbaa !9
  %206 = load i32, ptr %27, align 4, !tbaa !11
  call void @_ZN10ImDrawList11_PathArcToNERK6ImVec2fffi(ptr noundef nonnull align 8 dereferenceable(196) %28, ptr noundef nonnull align 4 dereferenceable(8) %202, float noundef %203, float noundef %204, float noundef %205, i32 noundef %206)
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %207

207:                                              ; preds = %184, %183, %37, %31
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL13ImFloorSignedf(float noundef) #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImAbsf(float noundef) #6

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #7 = { 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 448}
!26 = !{!"_ZTS20ImDrawListSharedData", !27, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !22, i64 28, !12, i64 44, !20, i64 48, !7, i64 64, !10, i64 448, !7, i64 452, !6, i64 520}
!27 = !{!"_ZTS6ImVec2", !10, i64 0, !10, i64 4}
!28 = !{!29, !29, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!14, !12, i64 120}
!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 }

; 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.ceil.f32(float) #3

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI6ImVec2E7reserveEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #5 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 #4 align 2 {
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %struct.ImVec2, align 4
  %9 = fcmp olt float %2, 5.000000e-01
  br i1 %9, label %10, label %12

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 %97

12:                                               ; preds = %6
  %13 = icmp sgt i32 %5, 0
  br i1 %13, label %14, label %15

14:                                               ; preds = %12
  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 %97

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 448
  %19 = load float, ptr %18, align 8, !tbaa !22
  %20 = fcmp ult float %19, %2
  br i1 %20, label %85, label %21

21:                                               ; preds = %15
  %22 = fcmp olt float %4, %3
  %23 = fmul float %3, 4.800000e+01
  %24 = fdiv float %23, 0x401921FB60000000
  %25 = fmul float %4, 4.800000e+01
  %26 = fdiv float %25, 0x401921FB60000000
  br i1 %22, label %27, label %33

27:                                               ; preds = %21
  %28 = tail call noundef float @_ZL13ImFloorSignedf(float noundef %24)
  %29 = fptosi float %28 to i32
  %30 = tail call float @llvm.ceil.f32(float %26)
  %31 = fptosi float %30 to i32
  %32 = sub nsw i32 %29, %31
  br label %39

33:                                               ; preds = %21
  %34 = tail call float @llvm.ceil.f32(float %24)
  %35 = fptosi float %34 to i32
  %36 = tail call noundef float @_ZL13ImFloorSignedf(float noundef %26)
  %37 = fptosi float %36 to i32
  %38 = sub nsw i32 %37, %35
  br label %39

39:                                               ; preds = %33, %27
  %.sink = phi i32 [ %38, %33 ], [ %32, %27 ]
  %40 = phi i32 [ %37, %33 ], [ %31, %27 ]
  %41 = phi i32 [ %35, %33 ], [ %29, %27 ]
  %42 = tail call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %.sink, i32 noundef 0)
  %43 = sitofp i32 %41 to float
  %44 = fmul float %43, 0x400921FB60000000
  %45 = fmul float %44, 2.000000e+00
  %46 = fdiv float %45, 4.800000e+01
  %47 = sitofp i32 %40 to float
  %48 = fmul float %47, 0x400921FB60000000
  %49 = fmul float %48, 2.000000e+00
  %50 = fdiv float %49, 4.800000e+01
  %51 = fsub float %46, %3
  %52 = tail call noundef float @_ZL5ImAbsf(float noundef %51)
  %53 = fcmp oge float %52, 0x3EE4F8B580000000
  %54 = fsub float %4, %50
  %55 = tail call noundef float @_ZL5ImAbsf(float noundef %54)
  %56 = fcmp oge float %55, 0x3EE4F8B580000000
  %57 = getelementptr inbounds i8, ptr %0, i64 120
  %58 = load i32, ptr %57, align 8, !tbaa !25
  %59 = add nsw i32 %42, 1
  %60 = zext i1 %53 to i32
  %61 = add nsw i32 %59, %60
  %62 = zext i1 %56 to i32
  %63 = add i32 %61, %58
  %64 = add i32 %63, %62
  tail call void @_ZN8ImVectorI6ImVec2E7reserveEi(ptr noundef nonnull align 8 dereferenceable(16) %57, i32 noundef %64)
  br i1 %53, label %65, label %73

65:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %66 = load float, ptr %1, align 4, !tbaa !26
  %67 = tail call float @cosf(float noundef %3) #7
  %68 = tail call float @llvm.fmuladd.f32(float %67, float %2, float %66)
  %69 = getelementptr inbounds i8, ptr %1, i64 4
  %70 = load float, ptr %69, align 4, !tbaa !27
  %71 = tail call float @sinf(float noundef %3) #7
  %72 = tail call float @llvm.fmuladd.f32(float %71, float %2, float %70)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %68, float noundef %72)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %73

73:                                               ; preds = %65, %39
  %74 = icmp sgt i32 %42, 0
  br i1 %74, label %75, label %76

75:                                               ; preds = %73
  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 %41, i32 noundef %40, i32 noundef 0)
  br label %76

76:                                               ; preds = %75, %73
  br i1 %56, label %77, label %97

77:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %78 = load float, ptr %1, align 4, !tbaa !26
  %79 = call float @cosf(float noundef %4) #7
  %80 = call float @llvm.fmuladd.f32(float %79, float %2, float %78)
  %81 = getelementptr inbounds i8, ptr %1, i64 4
  %82 = load float, ptr %81, align 4, !tbaa !27
  %83 = call float @sinf(float noundef %4) #7
  %84 = call float @llvm.fmuladd.f32(float %83, float %2, float %82)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %8, float noundef %80, float noundef %84)
  call void @_ZN8ImVectorI6ImVec2E9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %57, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %97

85:                                               ; preds = %15
  %86 = fsub float %4, %3
  %87 = tail call noundef float @_ZL5ImAbsf(float noundef %86)
  %88 = tail call noundef i32 @_ZNK10ImDrawList27_CalcCircleAutoSegmentCountEf(ptr noundef nonnull align 8 dereferenceable(196) %0, float noundef %2)
  %89 = sitofp i32 %88 to float
  %90 = fmul float %87, %89
  %91 = fdiv float %90, 0x401921FB60000000
  %92 = tail call float @llvm.ceil.f32(float %91)
  %93 = fptosi float %92 to i32
  %94 = fdiv float 0x401921FB60000000, %87
  %95 = fptosi float %94 to i32
  %96 = tail call noundef i32 @_ZL5ImMaxIiET_S0_S0_(i32 noundef %93, i32 noundef %95)
  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 %96)
  br label %97

97:                                               ; preds = %76, %77, %85, %14, %10
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL13ImFloorSignedf(float noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImAbsf(float noundef) local_unnamed_addr #6

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #7 = { 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 448}
!23 = !{!"_ZTS20ImDrawListSharedData", !24, i64 0, !11, i64 8, !19, i64 16, !19, i64 20, !19, i64 24, !18, i64 28, !8, i64 44, !16, i64 48, !9, i64 64, !19, i64 448, !9, i64 452, !11, i64 520}
!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,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass