; LLVM IR from karlkurzer/path_planner :: src/dynamicvoronoi.ll (ZN11HybridAStar14DynamicVoronoi9visualizeEPKc)

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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.HybridAStar::DynamicVoronoi" = type { %"class.HybridAStar::BucketPrioQueue", %"class.std::queue", %"class.std::vector.3", %"class.std::vector.3", %"class.std::vector.3", i32, i32, ptr, ptr, i32, double, double }
%"class.HybridAStar::BucketPrioQueue" = type { i32, i32, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::queue<HybridAStar::IntPoint>, std::allocator<std::queue<HybridAStar::IntPoint>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::queue<HybridAStar::IntPoint>, std::allocator<std::queue<HybridAStar::IntPoint>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::queue<HybridAStar::IntPoint>, std::allocator<std::queue<HybridAStar::IntPoint>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::queue<HybridAStar::IntPoint>, std::allocator<std::queue<HybridAStar::IntPoint>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Deque_impl" }
%"struct.std::_Deque_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Deque_impl" = type { %"struct.std::_Deque_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Deque_impl_data" }
%"struct.std::_Deque_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HybridAStar::IntPoint, std::allocator<HybridAStar::IntPoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.HybridAStar::DynamicVoronoi::dataCell" = type { float, i8, i8, i32, i32, i8, i32 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 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: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK11HybridAStar14DynamicVoronoi9isVoronoiEii(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11HybridAStar14DynamicVoronoi9visualizeEPKc(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = call noalias ptr @fopen(ptr noundef %12, ptr noundef @.str)
  store ptr %13, ptr %5, align 8, !tbaa !5
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %18, label %16

16:                                               ; preds = %2
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.1)
  store i32 1, ptr %6, align 4
  br label %119

18:                                               ; preds = %2
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.2) #7
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.HybridAStar::DynamicVoronoi", ptr %11, i32 0, i32 6
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = getelementptr inbounds %"class.HybridAStar::DynamicVoronoi", ptr %11, i32 0, i32 5
  %25 = load i32, ptr %24, align 8, !tbaa !29
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef @.str.3, i32 noundef %23, i32 noundef %25) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %27 = getelementptr inbounds %"class.HybridAStar::DynamicVoronoi", ptr %11, i32 0, i32 5
  %28 = load i32, ptr %27, align 8, !tbaa !29
  %29 = sub nsw i32 %28, 1
  store i32 %29, ptr %7, align 4, !tbaa !30
  br label %30

30:                                               ; preds = %113, %18
  %31 = load i32, ptr %7, align 4, !tbaa !30
  %32 = icmp sge i32 %31, 0
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %116

34:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !30
  br label %35

35:                                               ; preds = %109, %34
  %36 = load i32, ptr %8, align 4, !tbaa !30
  %37 = getelementptr inbounds %"class.HybridAStar::DynamicVoronoi", ptr %11, i32 0, i32 6
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = icmp slt i32 %36, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %35
  store i32 5, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %112

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  store i8 0, ptr %9, align 1, !tbaa !31
  %42 = load i32, ptr %8, align 4, !tbaa !30
  %43 = load i32, ptr %7, align 4, !tbaa !30
  %44 = call noundef zeroext i1 @_ZNK11HybridAStar14DynamicVoronoi9isVoronoiEii(ptr noundef nonnull align 8 dereferenceable(232) %11, i32 noundef %42, i32 noundef %43)
  br i1 %44, label %45, label %52

45:                                               ; preds = %41
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call i32 @fputc(i32 noundef 255, ptr noundef %46)
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = call i32 @fputc(i32 noundef 0, ptr noundef %48)
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call i32 @fputc(i32 noundef 0, ptr noundef %50)
  br label %108

52:                                               ; preds = %41
  %53 = getelementptr inbounds %"class.HybridAStar::DynamicVoronoi", ptr %11, i32 0, i32 7
  %54 = load ptr, ptr %53, align 8, !tbaa !32
  %55 = load i32, ptr %8, align 4, !tbaa !30
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = load i32, ptr %7, align 4, !tbaa !30
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %"struct.HybridAStar::DynamicVoronoi::dataCell", ptr %58, i64 %60
  %62 = getelementptr inbounds %"struct.HybridAStar::DynamicVoronoi::dataCell", ptr %61, i32 0, i32 6
  %63 = load i32, ptr %62, align 4, !tbaa !33
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %72

65:                                               ; preds = %52
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = call i32 @fputc(i32 noundef 0, ptr noundef %66)
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = call i32 @fputc(i32 noundef 0, ptr noundef %68)
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = call i32 @fputc(i32 noundef 0, ptr noundef %70)
  br label %107

72:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %73 = getelementptr inbounds %"class.HybridAStar::DynamicVoronoi", ptr %11, i32 0, i32 7
  %74 = load ptr, ptr %73, align 8, !tbaa !32
  %75 = load i32, ptr %8, align 4, !tbaa !30
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds ptr, ptr %74, i64 %76
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  %79 = load i32, ptr %7, align 4, !tbaa !30
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %"struct.HybridAStar::DynamicVoronoi::dataCell", ptr %78, i64 %80
  %82 = getelementptr inbounds %"struct.HybridAStar::DynamicVoronoi::dataCell", ptr %81, i32 0, i32 0
  %83 = load float, ptr %82, align 4, !tbaa !37
  %84 = call float @llvm.fmuladd.f32(float %83, float 5.000000e+00, float 8.000000e+01)
  store float %84, ptr %10, align 4, !tbaa !38
  %85 = load float, ptr %10, align 4, !tbaa !38
  %86 = fcmp ogt float %85, 2.550000e+02
  br i1 %86, label %87, label %88

87:                                               ; preds = %72
  store float 2.550000e+02, ptr %10, align 4, !tbaa !38
  br label %88

88:                                               ; preds = %87, %72
  %89 = load float, ptr %10, align 4, !tbaa !38
  %90 = fcmp olt float %89, 0.000000e+00
  br i1 %90, label %91, label %92

91:                                               ; preds = %88
  store float 0.000000e+00, ptr %10, align 4, !tbaa !38
  br label %92

92:                                               ; preds = %91, %88
  %93 = load float, ptr %10, align 4, !tbaa !38
  %94 = fptoui float %93 to i8
  store i8 %94, ptr %9, align 1, !tbaa !31
  %95 = load i8, ptr %9, align 1, !tbaa !31
  %96 = zext i8 %95 to i32
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = call i32 @fputc(i32 noundef %96, ptr noundef %97)
  %99 = load i8, ptr %9, align 1, !tbaa !31
  %100 = zext i8 %99 to i32
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = call i32 @fputc(i32 noundef %100, ptr noundef %101)
  %103 = load i8, ptr %9, align 1, !tbaa !31
  %104 = zext i8 %103 to i32
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = call i32 @fputc(i32 noundef %104, ptr noundef %105)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %107

107:                                              ; preds = %92, %65
  br label %108

108:                                              ; preds = %107, %45
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %8, align 4, !tbaa !30
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %8, align 4, !tbaa !30
  br label %35, !llvm.loop !39

112:                                              ; preds = %40
  br label %113

113:                                              ; preds = %112
  %114 = load i32, ptr %7, align 4, !tbaa !30
  %115 = add nsw i32 %114, -1
  store i32 %115, ptr %7, align 4, !tbaa !30
  br label %30, !llvm.loop !41

116:                                              ; preds = %33
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = call i32 @fclose(ptr noundef %117)
  store i32 0, ptr %6, align 4
  br label %119

119:                                              ; preds = %116, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %120 = load i32, ptr %6, align 4
  switch i32 %120, label %122 [
    i32 0, label %121
    i32 1, label %121
  ]

121:                                              ; preds = %119, %119
  ret void

122:                                              ; preds = %119
  unreachable
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

declare i32 @fputc(i32 noundef, ptr noundef) #3

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

declare i32 @fclose(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !12, i64 188}
!10 = !{!"_ZTSN11HybridAStar14DynamicVoronoiE", !11, i64 0, !17, i64 32, !24, i64 112, !24, i64 136, !24, i64 160, !12, i64 184, !12, i64 188, !6, i64 192, !6, i64 200, !12, i64 208, !28, i64 216, !28, i64 224}
!11 = !{!"_ZTSN11HybridAStar15BucketPrioQueueE", !12, i64 0, !12, i64 4, !13, i64 8}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSSt6vectorISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt5queueIN11HybridAStar8IntPointESt5dequeIS1_SaIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSSt5dequeIN11HybridAStar8IntPointESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt11_Deque_baseIN11HybridAStar8IntPointESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseIN11HybridAStar8IntPointESaIS1_EE11_Deque_implE", !21, i64 0}
!21 = !{!"_ZTSNSt11_Deque_baseIN11HybridAStar8IntPointESaIS1_EE16_Deque_impl_dataE", !6, i64 0, !22, i64 8, !23, i64 16, !23, i64 48}
!22 = !{!"long", !7, i64 0}
!23 = !{!"_ZTSSt15_Deque_iteratorIN11HybridAStar8IntPointERS1_PS1_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt6vectorIN11HybridAStar8IntPointESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIN11HybridAStar8IntPointESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN11HybridAStar8IntPointESaIS1_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN11HybridAStar8IntPointESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!28 = !{!"double", !7, i64 0}
!29 = !{!10, !12, i64 184}
!30 = !{!12, !12, i64 0}
!31 = !{!7, !7, i64 0}
!32 = !{!10, !6, i64 192}
!33 = !{!34, !12, i64 20}
!34 = !{!"_ZTSN11HybridAStar14DynamicVoronoi8dataCellE", !35, i64 0, !7, i64 4, !7, i64 5, !12, i64 8, !12, i64 12, !36, i64 16, !12, i64 20}
!35 = !{!"float", !7, i64 0}
!36 = !{!"bool", !7, i64 0}
!37 = !{!34, !35, i64 0}
!38 = !{!35, !35, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.HybridAStar::DynamicVoronoi::dataCell" = type { float, i8, i8, i32, i32, i8, i32 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK11HybridAStar14DynamicVoronoi9isVoronoiEii(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11HybridAStar14DynamicVoronoi9visualizeEPKc(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr nocapture noundef readonly %1) local_unnamed_addr #1 align 2 {
  %3 = tail call noalias ptr @fopen(ptr noundef %1, ptr noundef nonnull @.str)
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %4, label %6

4:                                                ; preds = %2
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.1)
  br label %50

6:                                                ; preds = %2
  %7 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.2) #5
  %8 = getelementptr inbounds i8, ptr %0, i64 188
  %9 = load i32, ptr %8, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 184
  %11 = load i32, ptr %10, align 8, !tbaa !28
  %12 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %3, ptr noundef nonnull @.str.3, i32 noundef %9, i32 noundef %11) #5
  %13 = load i32, ptr %10, align 8, !tbaa !28
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.preheader.lr.ph, label %._crit_edge

.preheader.lr.ph:                                 ; preds = %6
  %15 = getelementptr inbounds i8, ptr %0, i64 192
  %16 = load i32, ptr %8, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.preheader.preheader, label %._crit_edge

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %.03135 = add nsw i32 %13, -1
  %18 = zext nneg i32 %.03135 to i64
  br label %.preheader

.loopexit:                                        ; preds = %43, %.preheader
  %19 = phi i32 [ %21, %.preheader ], [ %47, %43 ]
  %indvars.iv.next40 = add nsw i64 %indvars.iv39, -1
  %20 = icmp sgt i64 %indvars.iv39, 0
  br i1 %20, label %.preheader, label %._crit_edge, !llvm.loop !29

.preheader:                                       ; preds = %.preheader.preheader, %.loopexit
  %21 = phi i32 [ %16, %.preheader.preheader ], [ %19, %.loopexit ]
  %indvars.iv39 = phi i64 [ %18, %.preheader.preheader ], [ %indvars.iv.next40, %.loopexit ]
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader
  %23 = trunc nuw nsw i64 %indvars.iv39 to i32
  br label %25

._crit_edge:                                      ; preds = %.loopexit, %.preheader.lr.ph, %6
  %24 = tail call i32 @fclose(ptr noundef nonnull %3)
  br label %50

25:                                               ; preds = %.lr.ph, %43
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %43 ]
  %26 = trunc nuw nsw i64 %indvars.iv to i32
  %27 = tail call noundef zeroext i1 @_ZNK11HybridAStar14DynamicVoronoi9isVoronoiEii(ptr noundef nonnull align 8 dereferenceable(232) %0, i32 noundef %26, i32 noundef %23)
  br i1 %27, label %43, label %28

28:                                               ; preds = %25
  %29 = load ptr, ptr %15, align 8, !tbaa !32
  %30 = getelementptr inbounds ptr, ptr %29, i64 %indvars.iv
  %31 = load ptr, ptr %30, align 8, !tbaa !33
  %32 = getelementptr inbounds %"struct.HybridAStar::DynamicVoronoi::dataCell", ptr %31, i64 %indvars.iv39
  %33 = getelementptr inbounds i8, ptr %32, i64 20
  %34 = load i32, ptr %33, align 4, !tbaa !34
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %43, label %36

36:                                               ; preds = %28
  %37 = load float, ptr %32, align 4, !tbaa !38
  %38 = tail call float @llvm.fmuladd.f32(float %37, float 5.000000e+00, float 8.000000e+01)
  %39 = fcmp ogt float %38, 2.550000e+02
  %.0 = select i1 %39, float 2.550000e+02, float %38
  %40 = fcmp olt float %.0, 0.000000e+00
  %.1 = select i1 %40, float 0.000000e+00, float %.0
  %41 = fptoui float %.1 to i8
  %42 = zext i8 %41 to i32
  br label %43

43:                                               ; preds = %28, %25, %36
  %.sink43 = phi i32 [ %42, %36 ], [ 255, %25 ], [ 0, %28 ]
  %.sink42 = phi i32 [ %42, %36 ], [ 0, %25 ], [ 0, %28 ]
  %44 = tail call i32 @fputc(i32 noundef %.sink43, ptr noundef nonnull %3)
  %45 = tail call i32 @fputc(i32 noundef %.sink42, ptr noundef nonnull %3)
  %46 = tail call i32 @fputc(i32 noundef %.sink42, ptr noundef nonnull %3)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = load i32, ptr %8, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %49 = icmp slt i64 %indvars.iv.next, %48
  br i1 %49, label %25, label %.loopexit, !llvm.loop !39

50:                                               ; preds = %._crit_edge, %4
  ret void
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fputc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { nofree 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 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 188}
!6 = !{!"_ZTSN11HybridAStar14DynamicVoronoiE", !7, i64 0, !16, i64 32, !23, i64 112, !23, i64 136, !23, i64 160, !8, i64 184, !8, i64 188, !15, i64 192, !15, i64 200, !8, i64 208, !27, i64 216, !27, i64 224}
!7 = !{!"_ZTSN11HybridAStar15BucketPrioQueueE", !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 = !{!"_ZTSSt6vectorISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt5queueIN11HybridAStar8IntPointESt5dequeIS2_SaIS2_EEESaIS6_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"_ZTSSt5queueIN11HybridAStar8IntPointESt5dequeIS1_SaIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSSt5dequeIN11HybridAStar8IntPointESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt11_Deque_baseIN11HybridAStar8IntPointESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt11_Deque_baseIN11HybridAStar8IntPointESaIS1_EE11_Deque_implE", !20, i64 0}
!20 = !{!"_ZTSNSt11_Deque_baseIN11HybridAStar8IntPointESaIS1_EE16_Deque_impl_dataE", !15, i64 0, !21, i64 8, !22, i64 16, !22, i64 48}
!21 = !{!"long", !9, i64 0}
!22 = !{!"_ZTSSt15_Deque_iteratorIN11HybridAStar8IntPointERS1_PS1_E", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!23 = !{!"_ZTSSt6vectorIN11HybridAStar8IntPointESaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseIN11HybridAStar8IntPointESaIS1_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN11HybridAStar8IntPointESaIS1_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIN11HybridAStar8IntPointESaIS1_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!27 = !{!"double", !9, i64 0}
!28 = !{!6, !8, i64 184}
!29 = distinct !{!29, !30, !31}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!"llvm.loop.unswitch.partial.disable"}
!32 = !{!6, !15, i64 192}
!33 = !{!15, !15, i64 0}
!34 = !{!35, !8, i64 20}
!35 = !{!"_ZTSN11HybridAStar14DynamicVoronoi8dataCellE", !36, i64 0, !9, i64 4, !9, i64 5, !8, i64 8, !8, i64 12, !37, i64 16, !8, i64 20}
!36 = !{!"float", !9, i64 0}
!37 = !{!"bool", !9, i64 0}
!38 = !{!35, !36, i64 0}
!39 = distinct !{!39, !30}


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