; LLVM IR from askforalfred/alfred :: gen/ff_planner (inst_pre)

; 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._WffNode = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, i8 }

@.str.103 = external hidden unnamed_addr constant [47 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

declare i32 @printf(ptr noundef, ...) #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

declare void @free_WffNode(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @detect_tautologies_in_wff(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct._WffNode, ptr %8, i32 0, i32 0
  %10 = load i32, ptr %9, align 8, !tbaa !9
  switch i32 %10, label %167 [
    i32 2008, label %11
    i32 2009, label %11
    i32 2006, label %15
    i32 2007, label %15
    i32 2005, label %162
    i32 2002, label %166
    i32 2003, label %166
    i32 2000, label %166
    i32 2001, label %166
  ]

11:                                               ; preds = %1, %1
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._WffNode, ptr %13, i32 0, i32 9
  call void @detect_tautologies_in_wff(ptr noundef %14)
  br label %173

15:                                               ; preds = %1, %1
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct._WffNode, ptr %17, i32 0, i32 4
  %19 = load ptr, ptr %18, align 8, !tbaa !12
  store ptr %19, ptr %3, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %24, %15
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %28

23:                                               ; preds = %20
  call void @detect_tautologies_in_wff(ptr noundef %3)
  br label %24

24:                                               ; preds = %23
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._WffNode, ptr %25, i32 0, i32 5
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  store ptr %27, ptr %3, align 8, !tbaa !5
  br label %20, !llvm.loop !14

28:                                               ; preds = %20
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._WffNode, ptr %30, i32 0, i32 4
  %32 = load ptr, ptr %31, align 8, !tbaa !12
  store ptr %32, ptr %3, align 8, !tbaa !5
  br label %33

33:                                               ; preds = %157, %28
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %41

36:                                               ; preds = %33
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._WffNode, ptr %37, i32 0, i32 5
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  %40 = icmp ne ptr %39, null
  br label %41

41:                                               ; preds = %36, %33
  %42 = phi i1 [ false, %33 ], [ %40, %36 ]
  br i1 %42, label %43, label %161

43:                                               ; preds = %41
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._WffNode, ptr %44, i32 0, i32 5
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  store ptr %46, ptr %4, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %152, %88, %43
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %156

50:                                               ; preds = %47
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = call zeroext i8 @are_identical_ATOMs(ptr noundef %51, ptr noundef %52)
  %54 = icmp ne i8 %53, 0
  br i1 %54, label %55, label %90

55:                                               ; preds = %50
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._WffNode, ptr %56, i32 0, i32 5
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._WffNode, ptr %59, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !16
  %62 = getelementptr inbounds %struct._WffNode, ptr %61, i32 0, i32 5
  store ptr %58, ptr %62, align 8, !tbaa !13
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._WffNode, ptr %63, i32 0, i32 5
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %75

67:                                               ; preds = %55
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._WffNode, ptr %68, i32 0, i32 6
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._WffNode, ptr %71, i32 0, i32 5
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = getelementptr inbounds %struct._WffNode, ptr %73, i32 0, i32 6
  store ptr %70, ptr %74, align 8, !tbaa !16
  br label %75

75:                                               ; preds = %67, %55
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %76, ptr %5, align 8, !tbaa !5
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._WffNode, ptr %77, i32 0, i32 5
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  store ptr %79, ptr %4, align 8, !tbaa !5
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._WffNode, ptr %80, i32 0, i32 7
  %82 = load ptr, ptr %81, align 8, !tbaa !17
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %88

84:                                               ; preds = %75
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._WffNode, ptr %85, i32 0, i32 7
  %87 = load ptr, ptr %86, align 8, !tbaa !17
  call void @free(ptr noundef %87) #5
  br label %88

88:                                               ; preds = %84, %75
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  call void @free(ptr noundef %89) #5
  br label %47, !llvm.loop !18

90:                                               ; preds = %50
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._WffNode, ptr %91, i32 0, i32 0
  %93 = load i32, ptr %92, align 8, !tbaa !9
  %94 = icmp eq i32 %93, 2005
  br i1 %94, label %95, label %121

95:                                               ; preds = %90
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._WffNode, ptr %96, i32 0, i32 9
  %98 = load ptr, ptr %97, align 8, !tbaa !19
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = call zeroext i8 @are_identical_ATOMs(ptr noundef %98, ptr noundef %99)
  %101 = zext i8 %100 to i32
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %121

103:                                              ; preds = %95
  %104 = load ptr, ptr %2, align 8, !tbaa !5
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._WffNode, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 8, !tbaa !9
  %108 = icmp eq i32 %107, 2006
  %109 = zext i1 %108 to i64
  %110 = select i1 %108, i32 2001, i32 2000
  %111 = load ptr, ptr %2, align 8, !tbaa !5
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._WffNode, ptr %112, i32 0, i32 0
  store i32 %110, ptr %113, align 8, !tbaa !9
  %114 = load ptr, ptr %2, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._WffNode, ptr %115, i32 0, i32 9
  %117 = load ptr, ptr %116, align 8, !tbaa !19
  call void @free_WffNode(ptr noundef %117)
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._WffNode, ptr %119, i32 0, i32 9
  store ptr null, ptr %120, align 8, !tbaa !19
  store i32 1, ptr %6, align 4
  br label %174

121:                                              ; preds = %95, %90
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._WffNode, ptr %122, i32 0, i32 0
  %124 = load i32, ptr %123, align 8, !tbaa !9
  %125 = icmp eq i32 %124, 2005
  br i1 %125, label %126, label %152

126:                                              ; preds = %121
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._WffNode, ptr %128, i32 0, i32 9
  %130 = load ptr, ptr %129, align 8, !tbaa !19
  %131 = call zeroext i8 @are_identical_ATOMs(ptr noundef %127, ptr noundef %130)
  %132 = zext i8 %131 to i32
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %152

134:                                              ; preds = %126
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = load ptr, ptr %135, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct._WffNode, ptr %136, i32 0, i32 0
  %138 = load i32, ptr %137, align 8, !tbaa !9
  %139 = icmp eq i32 %138, 2006
  %140 = zext i1 %139 to i64
  %141 = select i1 %139, i32 2001, i32 2000
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._WffNode, ptr %143, i32 0, i32 0
  store i32 %141, ptr %144, align 8, !tbaa !9
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct._WffNode, ptr %146, i32 0, i32 9
  %148 = load ptr, ptr %147, align 8, !tbaa !19
  call void @free_WffNode(ptr noundef %148)
  %149 = load ptr, ptr %2, align 8, !tbaa !5
  %150 = load ptr, ptr %149, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct._WffNode, ptr %150, i32 0, i32 9
  store ptr null, ptr %151, align 8, !tbaa !19
  store i32 1, ptr %6, align 4
  br label %174

152:                                              ; preds = %126, %121
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._WffNode, ptr %153, i32 0, i32 5
  %155 = load ptr, ptr %154, align 8, !tbaa !13
  store ptr %155, ptr %4, align 8, !tbaa !5
  br label %47, !llvm.loop !18

156:                                              ; preds = %47
  br label %157

157:                                              ; preds = %156
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct._WffNode, ptr %158, i32 0, i32 5
  %160 = load ptr, ptr %159, align 8, !tbaa !13
  store ptr %160, ptr %3, align 8, !tbaa !5
  br label %33, !llvm.loop !20

161:                                              ; preds = %41
  br label %173

162:                                              ; preds = %1
  %163 = load ptr, ptr %2, align 8, !tbaa !5
  %164 = load ptr, ptr %163, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._WffNode, ptr %164, i32 0, i32 9
  call void @detect_tautologies_in_wff(ptr noundef %165)
  br label %173

166:                                              ; preds = %1, %1, %1, %1
  br label %173

167:                                              ; preds = %1
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = load ptr, ptr %168, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._WffNode, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %170, align 8, !tbaa !9
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.103, i32 noundef %171)
  call void @exit(i32 noundef 1) #6
  unreachable

173:                                              ; preds = %166, %162, %161, %11
  store i32 0, ptr %6, align 4
  br label %174

174:                                              ; preds = %173, %134, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %175 = load i32, ptr %6, align 4
  switch i32 %175, label %177 [
    i32 0, label %176
    i32 1, label %176
  ]

176:                                              ; preds = %174, %174
  ret void

177:                                              ; preds = %174
  unreachable
}

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @are_identical_ATOMs(ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_WffNode", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !6, i64 88, !7, i64 96}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 24}
!13 = !{!10, !6, i64 32}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 48}
!18 = distinct !{!18, !15}
!19 = !{!10, !6, i64 64}
!20 = distinct !{!20, !15}


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

@.str.103 = external hidden unnamed_addr constant [47 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

declare void @free_WffNode(ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @detect_tautologies_in_wff(ptr nocapture noundef readonly %0) local_unnamed_addr #5 {
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = load i32, ptr %3, align 8, !tbaa !9
  switch i32 %4, label %64 [
    i32 2008, label %5
    i32 2009, label %5
    i32 2006, label %7
    i32 2007, label %7
    i32 2005, label %62
    i32 2002, label %.critedge
    i32 2003, label %.critedge
    i32 2000, label %.critedge
    i32 2001, label %.critedge
  ]

5:                                                ; preds = %1, %1
  %6 = getelementptr inbounds i8, ptr %3, i64 64
  tail call void @detect_tautologies_in_wff(ptr noundef nonnull %6)
  br label %.critedge

7:                                                ; preds = %1, %1
  %8 = getelementptr inbounds i8, ptr %3, i64 24
  %storemerge43 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %storemerge43, ptr %2, align 8, !tbaa !5
  %.not44 = icmp eq ptr %storemerge43, null
  br i1 %.not44, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %7, %.lr.ph
  %storemerge45 = phi ptr [ %storemerge, %.lr.ph ], [ %storemerge43, %7 ]
  call void @detect_tautologies_in_wff(ptr noundef nonnull %2)
  %9 = getelementptr inbounds i8, ptr %storemerge45, i64 32
  %storemerge = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %storemerge, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %storemerge, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph
  %.pre = load ptr, ptr %0, align 8, !tbaa !5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre, i64 24
  %storemerge3449.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !5
  %.not3550 = icmp eq ptr %storemerge3449.pre, null
  br i1 %.not3550, label %.critedge, label %.lr.ph53

.loopexit:                                        ; preds = %.backedge
  %storemerge34 = load ptr, ptr %10, align 8, !tbaa !5
  %.not35 = icmp eq ptr %storemerge34, null
  br i1 %.not35, label %.critedge, label %.lr.ph53, !llvm.loop !14

.lr.ph53:                                         ; preds = %._crit_edge, %.loopexit
  %storemerge3451 = phi ptr [ %storemerge34, %.loopexit ], [ %storemerge3449.pre, %._crit_edge ]
  %10 = getelementptr inbounds i8, ptr %storemerge3451, i64 32
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %.not36 = icmp eq ptr %11, null
  br i1 %.not36, label %.critedge, label %.preheader

.preheader:                                       ; preds = %.lr.ph53
  %12 = getelementptr inbounds i8, ptr %storemerge3451, i64 64
  br label %13

13:                                               ; preds = %.preheader, %.backedge
  %.046 = phi ptr [ %11, %.preheader ], [ %.0.be, %.backedge ]
  %14 = tail call zeroext i8 @are_identical_ATOMs(ptr noundef nonnull %storemerge3451, ptr noundef nonnull %.046)
  %.not38 = icmp eq i8 %14, 0
  br i1 %.not38, label %28, label %15

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %.046, i64 32
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %.046, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %19, i64 32
  store ptr %17, ptr %20, align 8, !tbaa !15
  %.not41 = icmp eq ptr %17, null
  br i1 %.not41, label %23, label %21

21:                                               ; preds = %15
  %22 = getelementptr inbounds i8, ptr %17, i64 40
  store ptr %19, ptr %22, align 8, !tbaa !16
  br label %23

23:                                               ; preds = %21, %15
  %24 = getelementptr inbounds i8, ptr %.046, i64 48
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  %.not42 = icmp eq ptr %25, null
  br i1 %.not42, label %27, label %26

26:                                               ; preds = %23
  tail call void @free(ptr noundef nonnull %25) #6
  br label %27

27:                                               ; preds = %26, %23
  tail call void @free(ptr noundef nonnull %.046) #6
  br label %.backedge

.backedge:                                        ; preds = %27, %59
  %.0.be = phi ptr [ %17, %27 ], [ %61, %59 ]
  %.not37 = icmp eq ptr %.0.be, null
  br i1 %.not37, label %.loopexit, label %13, !llvm.loop !18

28:                                               ; preds = %13
  %29 = load i32, ptr %storemerge3451, align 8, !tbaa !9
  %30 = icmp eq i32 %29, 2005
  br i1 %30, label %31, label %43

31:                                               ; preds = %28
  %32 = load ptr, ptr %12, align 8, !tbaa !19
  %33 = tail call zeroext i8 @are_identical_ATOMs(ptr noundef %32, ptr noundef nonnull %.046)
  %.not39 = icmp eq i8 %33, 0
  br i1 %.not39, label %43, label %34

34:                                               ; preds = %31
  %35 = load ptr, ptr %0, align 8, !tbaa !5
  %36 = load i32, ptr %35, align 8, !tbaa !9
  %37 = icmp eq i32 %36, 2006
  %38 = select i1 %37, i32 2001, i32 2000
  store i32 %38, ptr %35, align 8, !tbaa !9
  %39 = getelementptr inbounds i8, ptr %35, i64 64
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  tail call void @free_WffNode(ptr noundef %40) #6
  %41 = load ptr, ptr %0, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 64
  store ptr null, ptr %42, align 8, !tbaa !19
  br label %.critedge

43:                                               ; preds = %31, %28
  %44 = load i32, ptr %.046, align 8, !tbaa !9
  %45 = icmp eq i32 %44, 2005
  br i1 %45, label %46, label %59

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %.046, i64 64
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  %49 = tail call zeroext i8 @are_identical_ATOMs(ptr noundef nonnull %storemerge3451, ptr noundef %48)
  %.not40 = icmp eq i8 %49, 0
  br i1 %.not40, label %59, label %50

50:                                               ; preds = %46
  %51 = load ptr, ptr %0, align 8, !tbaa !5
  %52 = load i32, ptr %51, align 8, !tbaa !9
  %53 = icmp eq i32 %52, 2006
  %54 = select i1 %53, i32 2001, i32 2000
  store i32 %54, ptr %51, align 8, !tbaa !9
  %55 = getelementptr inbounds i8, ptr %51, i64 64
  %56 = load ptr, ptr %55, align 8, !tbaa !19
  tail call void @free_WffNode(ptr noundef %56) #6
  %57 = load ptr, ptr %0, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %57, i64 64
  store ptr null, ptr %58, align 8, !tbaa !19
  br label %.critedge

59:                                               ; preds = %46, %43
  %60 = getelementptr inbounds i8, ptr %.046, i64 32
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  br label %.backedge

62:                                               ; preds = %1
  %63 = getelementptr inbounds i8, ptr %3, i64 64
  tail call void @detect_tautologies_in_wff(ptr noundef nonnull %63)
  br label %.critedge

64:                                               ; preds = %1
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.103, i32 noundef %4)
  tail call void @exit(i32 noundef 1) #7
  unreachable

.critedge:                                        ; preds = %.lr.ph53, %.loopexit, %._crit_edge, %7, %5, %62, %1, %1, %1, %1, %50, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @are_identical_ATOMs(ptr noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "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 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 = { nounwind }
attributes #7 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_WffNode", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !11, i64 72, !6, i64 80, !6, i64 88, !7, i64 96}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = !{!10, !6, i64 32}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 48}
!18 = distinct !{!18, !13}
!19 = !{!10, !6, i64 64}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass