; LLVM IR from ImperialCollegeLondon/pnflow :: src/pnm/pnflow/polygon/layerApex.ll (ZNK9LayerApex15layerCollapsePcEddddb)

; 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.LayerApex = type { %class.Apex, i32, ptr, double, ptr, double }
%class.Apex = type { ptr, i8, double, double, ptr, i32, double, double, double, double, i8, i8, i8, i8, %"struct.std::pair" }
%"struct.std::pair" = type { i32, double }

@_ZN4Apex15LOWEST_LAYER_PCE = external constant double, align 8
@_ZN4Apex11INF_NEG_NUME = external constant double, align 8
@_ZN4Apex11INF_POS_NUME = external constant double, align 8

; 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 ptr @_ZNK9ElemModel6elemanEv(ptr noundef nonnull align 8 dereferenceable(152)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK9LayerApex15layerCollapsePcEddddb(ptr noundef nonnull align 8 dereferenceable(144) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, i1 noundef zeroext %5) #2 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca i8, align 1
  %13 = alloca double, align 8
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  store ptr %0, ptr %7, align 8, !tbaa !5
  store double %1, ptr %8, align 8, !tbaa !9
  store double %2, ptr %9, align 8, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !9
  store double %4, ptr %11, align 8, !tbaa !9
  %16 = zext i1 %5 to i8
  store i8 %16, ptr %12, align 1, !tbaa !11
  %17 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %18 = getelementptr inbounds %class.LayerApex, ptr %17, i32 0, i32 1
  store i32 0, ptr %18, align 8, !tbaa !13
  %19 = getelementptr inbounds %class.LayerApex, ptr %17, i32 0, i32 4
  %20 = load ptr, ptr %19, align 8, !tbaa !18
  %21 = call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %20)
  br i1 %21, label %24, label %22

22:                                               ; preds = %6
  %23 = load double, ptr @_ZN4Apex15LOWEST_LAYER_PCE, align 8, !tbaa !9
  store double %23, ptr %13, align 8, !tbaa !9
  br label %118

24:                                               ; preds = %6
  %25 = load i8, ptr %12, align 1, !tbaa !11, !range !19, !noundef !20
  %26 = trunc i8 %25 to i1
  br i1 %26, label %27, label %31

27:                                               ; preds = %24
  %28 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %17)
  br i1 %28, label %29, label %31

29:                                               ; preds = %27
  %30 = load double, ptr @_ZN4Apex11INF_NEG_NUME, align 8, !tbaa !9
  store double %30, ptr %13, align 8, !tbaa !9
  br label %117

31:                                               ; preds = %27, %24
  %32 = load i8, ptr %12, align 1, !tbaa !11, !range !19, !noundef !20
  %33 = trunc i8 %32 to i1
  br i1 %33, label %38, label %34

34:                                               ; preds = %31
  %35 = call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %17)
  br i1 %35, label %38, label %36

36:                                               ; preds = %34
  %37 = load double, ptr @_ZN4Apex11INF_POS_NUME, align 8, !tbaa !9
  store double %37, ptr %13, align 8, !tbaa !9
  br label %116

38:                                               ; preds = %34, %31
  %39 = getelementptr inbounds %class.Apex, ptr %17, i32 0, i32 14
  %40 = getelementptr inbounds %"struct.std::pair", ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !21
  %42 = icmp sgt i32 %41, -1
  br i1 %42, label %43, label %45

43:                                               ; preds = %38
  %44 = load double, ptr @_ZN4Apex11INF_NEG_NUME, align 8, !tbaa !9
  store double %44, ptr %13, align 8, !tbaa !9
  br label %115

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  %46 = getelementptr inbounds %class.LayerApex, ptr %17, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !22
  %48 = call noundef ptr @_ZNK9ElemModel6elemanEv(ptr noundef nonnull align 8 dereferenceable(152) %47)
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %48)
  %50 = getelementptr inbounds %"struct.std::pair", ptr %49, i32 0, i32 0
  %51 = load i32, ptr %50, align 8, !tbaa !23
  %52 = icmp slt i32 %51, 0
  %53 = zext i1 %52 to i8
  store i8 %53, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %54 = getelementptr inbounds %class.LayerApex, ptr %17, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %55)
  br i1 %56, label %57, label %64

57:                                               ; preds = %45
  %58 = getelementptr inbounds %class.LayerApex, ptr %17, i32 0, i32 4
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex13trappedCornerEv(ptr noundef nonnull align 8 dereferenceable(144) %59)
  %61 = getelementptr inbounds %"struct.std::pair", ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 8, !tbaa !23
  %63 = icmp slt i32 %62, 0
  br label %64

64:                                               ; preds = %57, %45
  %65 = phi i1 [ false, %45 ], [ %63, %57 ]
  %66 = zext i1 %65 to i8
  store i8 %66, ptr %15, align 1, !tbaa !11
  %67 = load i8, ptr %14, align 1, !tbaa !11, !range !19, !noundef !20
  %68 = trunc i8 %67 to i1
  br i1 %68, label %69, label %78

69:                                               ; preds = %64
  %70 = load i8, ptr %15, align 1, !tbaa !11, !range !19, !noundef !20
  %71 = trunc i8 %70 to i1
  br i1 %71, label %72, label %78

72:                                               ; preds = %69
  %73 = load double, ptr %8, align 8, !tbaa !9
  %74 = load double, ptr %9, align 8, !tbaa !9
  %75 = load double, ptr %10, align 8, !tbaa !9
  %76 = load double, ptr %11, align 8, !tbaa !9
  %77 = call noundef double @_ZNK9LayerApex30layerCollapsePc_fromEitherSideEddddb(ptr noundef nonnull align 8 dereferenceable(144) %17, double noundef %73, double noundef %74, double noundef %75, double noundef %76, i1 noundef zeroext false)
  store double %77, ptr %13, align 8, !tbaa !9
  br label %114

78:                                               ; preds = %69, %64
  %79 = load i8, ptr %14, align 1, !tbaa !11, !range !19, !noundef !20
  %80 = trunc i8 %79 to i1
  br i1 %80, label %81, label %92

81:                                               ; preds = %78
  %82 = load double, ptr %8, align 8, !tbaa !9
  %83 = getelementptr inbounds %class.LayerApex, ptr %17, i32 0, i32 4
  %84 = load ptr, ptr %83, align 8, !tbaa !18
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex24trappedCornerNOTTOBEUSEDEv(ptr noundef nonnull align 8 dereferenceable(144) %84)
  %86 = getelementptr inbounds %"struct.std::pair", ptr %85, i32 0, i32 1
  %87 = load double, ptr %86, align 8, !tbaa !24
  %88 = load double, ptr %9, align 8, !tbaa !9
  %89 = load double, ptr %10, align 8, !tbaa !9
  %90 = load double, ptr %11, align 8, !tbaa !9
  %91 = call noundef double @_ZNK9LayerApex26layerCollapsePc_FromCentreEddddd(ptr noundef nonnull align 8 dereferenceable(144) %17, double noundef %82, double noundef %87, double noundef %88, double noundef %89, double noundef %90)
  store double %91, ptr %13, align 8, !tbaa !9
  br label %113

92:                                               ; preds = %78
  %93 = load i8, ptr %15, align 1, !tbaa !11, !range !19, !noundef !20
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %104

95:                                               ; preds = %92
  %96 = getelementptr inbounds %class.Apex, ptr %17, i32 0, i32 14
  %97 = getelementptr inbounds %"struct.std::pair", ptr %96, i32 0, i32 1
  %98 = load double, ptr %97, align 8, !tbaa !25
  %99 = load double, ptr %8, align 8, !tbaa !9
  %100 = load double, ptr %9, align 8, !tbaa !9
  %101 = load double, ptr %10, align 8, !tbaa !9
  %102 = load double, ptr %11, align 8, !tbaa !9
  %103 = call noundef double @_ZNK9LayerApex26layerCollapsePc_FromCornerEddddd(ptr noundef nonnull align 8 dereferenceable(144) %17, double noundef %98, double noundef %99, double noundef %100, double noundef %101, double noundef %102)
  store double %103, ptr %13, align 8, !tbaa !9
  br label %112

104:                                              ; preds = %92
  %105 = load i8, ptr %12, align 1, !tbaa !11, !range !19, !noundef !20
  %106 = trunc i8 %105 to i1
  br i1 %106, label %107, label %109

107:                                              ; preds = %104
  %108 = load double, ptr @_ZN4Apex11INF_POS_NUME, align 8, !tbaa !9
  store double %108, ptr %13, align 8, !tbaa !9
  br label %111

109:                                              ; preds = %104
  %110 = load double, ptr @_ZN4Apex11INF_NEG_NUME, align 8, !tbaa !9
  store double %110, ptr %13, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %109, %107
  br label %112

112:                                              ; preds = %111, %95
  br label %113

113:                                              ; preds = %112, %81
  br label %114

114:                                              ; preds = %113, %72
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  br label %115

115:                                              ; preds = %114, %43
  br label %116

116:                                              ; preds = %115, %36
  br label %117

117:                                              ; preds = %116, %29
  br label %118

118:                                              ; preds = %117, %22
  %119 = load double, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret double %119
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK9LayerApex26layerCollapsePc_FromCentreEddddd(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK9LayerApex26layerCollapsePc_FromCornerEddddd(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK9LayerApex30layerCollapsePc_fromEitherSideEddddb(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex13trappedCornerEv(ptr noundef nonnull align 8 dereferenceable(144)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex24trappedCornerNOTTOBEUSEDEv(ptr noundef nonnull align 8 dereferenceable(144)) #1 align 2

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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !16, i64 104}
!14 = !{!"_ZTS9LayerApex", !15, i64 0, !16, i64 104, !6, i64 112, !10, i64 120, !6, i64 128, !10, i64 136}
!15 = !{!"_ZTS4Apex", !12, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !16, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !12, i64 80, !12, i64 81, !12, i64 82, !12, i64 83, !17, i64 88}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSSt4pairIidE", !16, i64 0, !10, i64 8}
!18 = !{!14, !6, i64 128}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!15, !16, i64 88}
!22 = !{!14, !6, i64 112}
!23 = !{!17, !16, i64 0}
!24 = !{!17, !10, i64 8}
!25 = !{!15, !10, i64 96}


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

@_ZN4Apex15LOWEST_LAYER_PCE = external local_unnamed_addr constant double, align 8
@_ZN4Apex11INF_NEG_NUME = external local_unnamed_addr constant double, align 8
@_ZN4Apex11INF_POS_NUME = external local_unnamed_addr constant double, align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9ElemModel6elemanEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK9LayerApex15layerCollapsePcEddddb(ptr noundef nonnull align 8 dereferenceable(144) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, i1 noundef zeroext %5) local_unnamed_addr #1 align 2 {
  %7 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 0, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 128
  %9 = load ptr, ptr %8, align 8, !tbaa !15
  %10 = tail call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %9)
  br i1 %10, label %13, label %11

11:                                               ; preds = %6
  %12 = load double, ptr @_ZN4Apex15LOWEST_LAYER_PCE, align 8, !tbaa !16
  br label %58

13:                                               ; preds = %6
  %14 = tail call noundef zeroext i1 @_ZNK4Apex6existsEv(ptr noundef nonnull align 8 dereferenceable(104) %0)
  br i1 %5, label %15, label %.critedge

15:                                               ; preds = %13
  br i1 %14, label %16, label %20

16:                                               ; preds = %15
  %17 = load double, ptr @_ZN4Apex11INF_NEG_NUME, align 8, !tbaa !16
  br label %58

.critedge:                                        ; preds = %13
  br i1 %14, label %20, label %18

18:                                               ; preds = %.critedge
  %19 = load double, ptr @_ZN4Apex11INF_POS_NUME, align 8, !tbaa !16
  br label %58

20:                                               ; preds = %15, %.critedge
  %21 = getelementptr inbounds i8, ptr %0, i64 88
  %22 = load i32, ptr %21, align 8, !tbaa !17
  %23 = icmp sgt i32 %22, -1
  br i1 %23, label %24, label %26

24:                                               ; preds = %20
  %25 = load double, ptr @_ZN4Apex11INF_NEG_NUME, align 8, !tbaa !16
  br label %58

26:                                               ; preds = %20
  %27 = getelementptr inbounds i8, ptr %0, i64 112
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = tail call noundef ptr @_ZNK9ElemModel6elemanEv(ptr noundef nonnull align 8 dereferenceable(152) %28)
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4Elem15trappingWatBulkEv(ptr noundef nonnull align 8 dereferenceable(408) %29)
  %31 = load i32, ptr %30, align 8, !tbaa !19
  %32 = icmp sgt i32 %31, -1
  %33 = load ptr, ptr %8, align 8, !tbaa !15
  %34 = tail call noundef zeroext i1 @_ZNK10CornerApex12cornerExistsEv(ptr noundef nonnull align 8 dereferenceable(144) %33)
  br i1 %34, label %35, label %.thread24

35:                                               ; preds = %26
  %36 = load ptr, ptr %8, align 8, !tbaa !15
  %37 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex13trappedCornerEv(ptr noundef nonnull align 8 dereferenceable(144) %36)
  %38 = load i32, ptr %37, align 8, !tbaa !19
  %39 = icmp sgt i32 %38, -1
  %brmerge = select i1 %32, i1 true, i1 %39
  br i1 %brmerge, label %42, label %40

40:                                               ; preds = %35
  %41 = tail call noundef double @_ZNK9LayerApex30layerCollapsePc_fromEitherSideEddddb(ptr noundef nonnull align 8 dereferenceable(144) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, i1 noundef zeroext false)
  br label %58

42:                                               ; preds = %35
  br i1 %32, label %49, label %43

.thread24:                                        ; preds = %26
  br i1 %32, label %.thread25, label %43

43:                                               ; preds = %.thread24, %42
  %44 = load ptr, ptr %8, align 8, !tbaa !15
  %45 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex24trappedCornerNOTTOBEUSEDEv(ptr noundef nonnull align 8 dereferenceable(144) %44)
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load double, ptr %46, align 8, !tbaa !20
  %48 = tail call noundef double @_ZNK9LayerApex26layerCollapsePc_FromCentreEddddd(ptr noundef nonnull align 8 dereferenceable(144) %0, double noundef %1, double noundef %47, double noundef %2, double noundef %3, double noundef %4)
  br label %58

49:                                               ; preds = %42
  br i1 %39, label %.thread25, label %50

50:                                               ; preds = %49
  %51 = getelementptr inbounds i8, ptr %0, i64 96
  %52 = load double, ptr %51, align 8, !tbaa !21
  %53 = tail call noundef double @_ZNK9LayerApex26layerCollapsePc_FromCornerEddddd(ptr noundef nonnull align 8 dereferenceable(144) %0, double noundef %52, double noundef %1, double noundef %2, double noundef %3, double noundef %4)
  br label %58

.thread25:                                        ; preds = %.thread24, %49
  br i1 %5, label %54, label %56

54:                                               ; preds = %.thread25
  %55 = load double, ptr @_ZN4Apex11INF_POS_NUME, align 8, !tbaa !16
  br label %58

56:                                               ; preds = %.thread25
  %57 = load double, ptr @_ZN4Apex11INF_NEG_NUME, align 8, !tbaa !16
  br label %58

58:                                               ; preds = %40, %50, %56, %54, %43, %16, %24, %18, %11
  %.1 = phi double [ %17, %16 ], [ %25, %24 ], [ %19, %18 ], [ %12, %11 ], [ %41, %40 ], [ %48, %43 ], [ %53, %50 ], [ %55, %54 ], [ %57, %56 ]
  ret double %.1
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK9LayerApex26layerCollapsePc_FromCentreEddddd(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK9LayerApex26layerCollapsePc_FromCornerEddddd(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, double noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK9LayerApex30layerCollapsePc_fromEitherSideEddddb(ptr noundef nonnull align 8 dereferenceable(144), double noundef, double noundef, double noundef, double noundef, i1 noundef zeroext) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex13trappedCornerEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK10CornerApex24trappedCornerNOTTOBEUSEDEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #0 align 2

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

!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, !13, i64 104}
!6 = !{!"_ZTS9LayerApex", !7, i64 0, !13, i64 104, !12, i64 112, !11, i64 120, !12, i64 128, !11, i64 136}
!7 = !{!"_ZTS4Apex", !8, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !13, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !8, i64 80, !8, i64 81, !8, i64 82, !8, i64 83, !14, i64 88}
!8 = !{!"bool", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"_ZTSSt4pairIidE", !13, i64 0, !11, i64 8}
!15 = !{!6, !12, i64 128}
!16 = !{!11, !11, i64 0}
!17 = !{!7, !13, i64 88}
!18 = !{!6, !12, i64 112}
!19 = !{!14, !13, i64 0}
!20 = !{!14, !11, i64 8}
!21 = !{!7, !11, i64 96}


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