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

; 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 }
%struct._Fact = type { i32, [5 x i32] }

@garity = external global [50 x i32], align 16
@lpos = external dso_local global [50 x ptr], align 16
@lneg = external dso_local global [50 x ptr], align 16
@lp = external dso_local global i32, align 4
@largs = external dso_local global [15 x i32], align 16
@.str.39 = external hidden unnamed_addr constant [58 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: nounwind uwtable
declare dso_local i32 @fact_adress() #1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @set_relevants_in_exp(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @set_relevants_in_wff(ptr noundef %0) #1 {
  %2 = alloca i8, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct._WffNode, ptr %9, i32 0, i32 0
  %11 = load i32, ptr %10, align 8, !tbaa !9
  switch i32 %11, label %118 [
    i32 2006, label %12
    i32 2007, label %12
    i32 2002, label %30
    i32 2003, label %104
  ]

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

17:                                               ; preds = %25, %12
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %20, label %29

20:                                               ; preds = %17
  %21 = call zeroext i8 @set_relevants_in_wff(ptr noundef %4)
  %22 = icmp ne i8 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  store i8 0, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %121

24:                                               ; preds = %20
  br label %25

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

29:                                               ; preds = %17
  br label %120

30:                                               ; preds = %1
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._WffNode, ptr %32, i32 0, i32 7
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds %struct._Fact, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !17
  store i32 %36, ptr @lp, align 4, !tbaa !19
  store i32 0, ptr %5, align 4, !tbaa !19
  br label %37

37:                                               ; preds = %57, %30
  %38 = load i32, ptr %5, align 4, !tbaa !19
  %39 = load i32, ptr @lp, align 4, !tbaa !19
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !19
  %43 = icmp slt i32 %38, %42
  br i1 %43, label %44, label %60

44:                                               ; preds = %37
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._WffNode, ptr %46, i32 0, i32 7
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = getelementptr inbounds %struct._Fact, ptr %48, i32 0, i32 1
  %50 = load i32, ptr %5, align 4, !tbaa !19
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [5 x i32], ptr %49, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !19
  %54 = load i32, ptr %5, align 4, !tbaa !19
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %55
  store i32 %53, ptr %56, align 4, !tbaa !19
  br label %57

57:                                               ; preds = %44
  %58 = load i32, ptr %5, align 4, !tbaa !19
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %5, align 4, !tbaa !19
  br label %37, !llvm.loop !20

60:                                               ; preds = %37
  %61 = call i32 @fact_adress()
  store i32 %61, ptr %6, align 4, !tbaa !19
  %62 = load i32, ptr @lp, align 4, !tbaa !19
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [50 x ptr], ptr @lneg, i64 0, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = load i32, ptr %6, align 4, !tbaa !19
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds i32, ptr %65, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !19
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %82, label %71

71:                                               ; preds = %60
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = load ptr, ptr %72, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._WffNode, ptr %73, i32 0, i32 0
  store i32 2000, ptr %74, align 8, !tbaa !9
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._WffNode, ptr %76, i32 0, i32 7
  %78 = load ptr, ptr %77, align 8, !tbaa !16
  call void @free(ptr noundef %78) #5
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._WffNode, ptr %80, i32 0, i32 7
  store ptr null, ptr %81, align 8, !tbaa !16
  br label %120

82:                                               ; preds = %60
  %83 = load i32, ptr @lp, align 4, !tbaa !19
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [50 x ptr], ptr @lpos, i64 0, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = load i32, ptr %6, align 4, !tbaa !19
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i32, ptr %86, i64 %88
  %90 = load i32, ptr %89, align 4, !tbaa !19
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %103, label %92

92:                                               ; preds = %82
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._WffNode, ptr %94, i32 0, i32 0
  store i32 2001, ptr %95, align 8, !tbaa !9
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._WffNode, ptr %97, i32 0, i32 7
  %99 = load ptr, ptr %98, align 8, !tbaa !16
  call void @free(ptr noundef %99) #5
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._WffNode, ptr %101, i32 0, i32 7
  store ptr null, ptr %102, align 8, !tbaa !16
  br label %120

103:                                              ; preds = %82
  br label %120

104:                                              ; preds = %1
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct._WffNode, ptr %106, i32 0, i32 11
  %108 = call zeroext i8 @set_relevants_in_exp(ptr noundef %107)
  %109 = icmp ne i8 %108, 0
  br i1 %109, label %110, label %116

110:                                              ; preds = %104
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = load ptr, ptr %111, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._WffNode, ptr %112, i32 0, i32 12
  %114 = call zeroext i8 @set_relevants_in_exp(ptr noundef %113)
  %115 = icmp ne i8 %114, 0
  br i1 %115, label %117, label %116

116:                                              ; preds = %110, %104
  store i8 0, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %121

117:                                              ; preds = %110
  br label %120

118:                                              ; preds = %1
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.39)
  call void @exit(i32 noundef 1) #6
  unreachable

120:                                              ; preds = %117, %103, %92, %71, %29
  store i8 1, ptr %2, align 1
  store i32 1, ptr %7, align 4
  br label %121

121:                                              ; preds = %120, %116, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %122 = load i8, ptr %2, align 1
  ret i8 %122
}

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

@garity = external local_unnamed_addr global [50 x i32], align 16
@lpos = external dso_local local_unnamed_addr global [50 x ptr], align 16
@lneg = external dso_local local_unnamed_addr global [50 x ptr], align 16
@lp = external dso_local local_unnamed_addr global i32, align 4
@largs = external dso_local local_unnamed_addr global [15 x i32], align 16
@.str.39 = external hidden unnamed_addr constant [58 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: nounwind uwtable
declare dso_local i32 @fact_adress() local_unnamed_addr #1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @set_relevants_in_exp(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local zeroext range(i8 0, 2) i8 @set_relevants_in_wff(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %4 = load i32, ptr %3, align 8, !tbaa !9
  switch i32 %4, label %63 [
    i32 2006, label %5
    i32 2007, label %5
    i32 2002, label %10
    i32 2003, label %56
  ]

5:                                                ; preds = %1, %1
  %6 = getelementptr inbounds i8, ptr %3, i64 24
  %storemerge26 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %storemerge26, ptr %2, align 8, !tbaa !5
  %.not2227 = icmp eq ptr %storemerge26, null
  br i1 %.not2227, label %.loopexit, label %.lr.ph30

7:                                                ; preds = %.lr.ph30
  %8 = getelementptr inbounds i8, ptr %storemerge28, i64 32
  %storemerge = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %storemerge, ptr %2, align 8, !tbaa !5
  %.not22 = icmp eq ptr %storemerge, null
  br i1 %.not22, label %.loopexit, label %.lr.ph30, !llvm.loop !12

.lr.ph30:                                         ; preds = %5, %7
  %storemerge28 = phi ptr [ %storemerge, %7 ], [ %storemerge26, %5 ]
  %9 = call zeroext i8 @set_relevants_in_wff(ptr noundef nonnull %2)
  %.not23 = icmp eq i8 %9, 0
  br i1 %.not23, label %.loopexit24, label %7

10:                                               ; preds = %1
  %11 = getelementptr inbounds i8, ptr %3, i64 48
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = load i32, ptr %12, align 4, !tbaa !15
  store i32 %13, ptr @lp, align 4, !tbaa !17
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [50 x i32], ptr @garity, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !17
  %17 = icmp sgt i32 %16, 0
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10
  %18 = ptrtoint ptr %12 to i64
  %19 = getelementptr inbounds i8, ptr %12, i64 4
  %wide.trip.count = zext nneg i32 %16 to i64
  %min.iters.check = icmp ult i32 %16, 8
  %20 = sub i64 add (i64 ptrtoint (ptr @largs to i64), i64 -4), %18
  %diff.check = icmp ult i64 %20, 32
  %or.cond = or i1 %min.iters.check, %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %21 = getelementptr inbounds [5 x i32], ptr %19, i64 0, i64 %index
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %wide.load = load <4 x i32>, ptr %21, align 4, !tbaa !17
  %wide.load36 = load <4 x i32>, ptr %22, align 4, !tbaa !17
  %23 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %index
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  store <4 x i32> %wide.load, ptr %23, align 16, !tbaa !17
  store <4 x i32> %wide.load36, ptr %24, align 16, !tbaa !17
  %index.next = add nuw i64 %index, 8
  %25 = icmp eq i64 %index.next, %n.vec
  br i1 %25, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %26 = getelementptr inbounds [5 x i32], ptr %19, i64 0, i64 %indvars.iv.prol
  %27 = load i32, ptr %26, align 4, !tbaa !17
  %28 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.prol
  store i32 %27, ptr %28, align 4, !tbaa !17
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !21

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %29 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %30 = icmp ugt i64 %29, -4
  br i1 %30, label %._crit_edge, label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %31 = getelementptr inbounds [5 x i32], ptr %19, i64 0, i64 %indvars.iv
  %32 = load i32, ptr %31, align 4, !tbaa !17
  %33 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv
  store i32 %32, ptr %33, align 4, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = getelementptr inbounds [5 x i32], ptr %19, i64 0, i64 %indvars.iv.next
  %35 = load i32, ptr %34, align 4, !tbaa !17
  %36 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next
  store i32 %35, ptr %36, align 4, !tbaa !17
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %37 = getelementptr inbounds [5 x i32], ptr %19, i64 0, i64 %indvars.iv.next.1
  %38 = load i32, ptr %37, align 4, !tbaa !17
  %39 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next.1
  store i32 %38, ptr %39, align 4, !tbaa !17
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %40 = getelementptr inbounds [5 x i32], ptr %19, i64 0, i64 %indvars.iv.next.2
  %41 = load i32, ptr %40, align 4, !tbaa !17
  %42 = getelementptr inbounds [15 x i32], ptr @largs, i64 0, i64 %indvars.iv.next.2
  store i32 %41, ptr %42, align 4, !tbaa !17
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %10
  %43 = tail call i32 @fact_adress()
  %44 = load i32, ptr @lp, align 4, !tbaa !17
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [50 x ptr], ptr @lneg, i64 0, i64 %45
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = sext i32 %43 to i64
  %49 = getelementptr inbounds i32, ptr %47, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !17
  %.not20 = icmp eq i32 %50, 0
  br i1 %.not20, label %.loopexit.sink.split, label %51

51:                                               ; preds = %._crit_edge
  %52 = getelementptr inbounds [50 x ptr], ptr @lpos, i64 0, i64 %45
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds i32, ptr %53, i64 %48
  %55 = load i32, ptr %54, align 4, !tbaa !17
  %.not21 = icmp eq i32 %55, 0
  br i1 %.not21, label %.loopexit.sink.split, label %.loopexit

56:                                               ; preds = %1
  %57 = getelementptr inbounds i8, ptr %3, i64 80
  %58 = tail call zeroext i8 @set_relevants_in_exp(ptr noundef nonnull %57)
  %.not = icmp eq i8 %58, 0
  br i1 %.not, label %.loopexit24, label %59

59:                                               ; preds = %56
  %60 = load ptr, ptr %0, align 8, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %60, i64 88
  %62 = tail call zeroext i8 @set_relevants_in_exp(ptr noundef nonnull %61)
  %.not19 = icmp eq i8 %62, 0
  br i1 %.not19, label %.loopexit24, label %.loopexit

63:                                               ; preds = %1
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39)
  tail call void @exit(i32 noundef 1) #6
  unreachable

.loopexit.sink.split:                             ; preds = %51, %._crit_edge
  %.sink34 = phi i32 [ 2000, %._crit_edge ], [ 2001, %51 ]
  %65 = load ptr, ptr %0, align 8, !tbaa !5
  store i32 %.sink34, ptr %65, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %65, i64 48
  %67 = load ptr, ptr %66, align 8, !tbaa !14
  tail call void @free(ptr noundef %67) #5
  %68 = load ptr, ptr %0, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 48
  store ptr null, ptr %69, align 8, !tbaa !14
  br label %.loopexit

.loopexit:                                        ; preds = %7, %.loopexit.sink.split, %5, %59, %51
  br label %.loopexit24

.loopexit24:                                      ; preds = %.lr.ph30, %56, %59, %.loopexit
  %.0 = phi i8 [ 1, %.loopexit ], [ 0, %59 ], [ 0, %56 ], [ 0, %.lr.ph30 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret i8 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress 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 #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 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!10, !6, i64 48}
!15 = !{!16, !11, i64 0}
!16 = !{!"_Fact", !11, i64 0, !7, i64 4}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !13, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !13, !19}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass