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

; 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._LnfExpNode = type { [25 x i32], [25 x float], i32, [25 x i32], [25 x float], i32, float }
%struct._State = type { ptr, i32, ptr, ptr }
%struct._Operator = type { ptr, [15 x ptr], i32, i8, i32, [15 x i32], [15 x i8], ptr, ptr, i8 }
%struct._Action = type { ptr, ptr, i8, ptr, i32, [15 x i32], [15 x i32], ptr, i32, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, ptr, i32, ptr }
%struct._NormOperator = type { ptr, i32, [15 x i32], [15 x i32], [15 x i32], i32, [15 x i32], ptr, i32, ptr, ptr, ptr, i32, ptr, i8 }
%struct._PseudoAction = type { ptr, [15 x i32], ptr, i32, ptr, ptr, ptr, i32, ptr, i32 }

@glnf_metric = external global %struct._LnfExpNode, align 4
@gactions = external global ptr, align 8
@gmetric = external global ptr, align 8
@gnum_operators = external global i32, align 4
@.str.8 = external hidden unnamed_addr constant [45 x i8], align 1
@goperators = external global [50000 x ptr], align 16
@.str.9 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@ginitial_state = external global %struct._State, align 8
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@gnum_logic_goal = external global i32, align 4
@glogic_goal = external global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@gnum_lnf_goal = external global i32, align 4
@glnf_goal_comp = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@glnf_goal_lh = external global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@glnf_goal_rh = external global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @print_lnf_representation() #2 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %3

3:                                                ; preds = %69, %0
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = load i32, ptr @gnum_operators, align 4, !tbaa !5
  %6 = icmp slt i32 %4, %5
  br i1 %6, label %7, label %72

7:                                                ; preds = %3
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = getelementptr inbounds [50000 x ptr], ptr @goperators, i64 0, i64 %9
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds %struct._Operator, ptr %11, i32 0, i32 0
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef %13)
  %15 = load ptr, ptr @gactions, align 8, !tbaa !9
  store ptr %15, ptr %2, align 8, !tbaa !9
  br label %16

16:                                               ; preds = %64, %7
  %17 = load ptr, ptr %2, align 8, !tbaa !9
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %68

19:                                               ; preds = %16
  %20 = load ptr, ptr %2, align 8, !tbaa !9
  %21 = getelementptr inbounds %struct._Action, ptr %20, i32 0, i32 0
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = icmp ne ptr %22, null
  br i1 %23, label %29, label %24

24:                                               ; preds = %19
  %25 = load ptr, ptr %2, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct._Action, ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %61

29:                                               ; preds = %24, %19
  %30 = load ptr, ptr %2, align 8, !tbaa !9
  %31 = getelementptr inbounds %struct._Action, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = icmp ne ptr %32, null
  br i1 %33, label %34, label %45

34:                                               ; preds = %29
  %35 = load ptr, ptr %2, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct._Action, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !13
  %38 = getelementptr inbounds %struct._NormOperator, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = load i32, ptr %1, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [50000 x ptr], ptr @goperators, i64 0, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  %44 = icmp ne ptr %39, %43
  br i1 %44, label %61, label %45

45:                                               ; preds = %34, %29
  %46 = load ptr, ptr %2, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct._Action, ptr %46, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %62

50:                                               ; preds = %45
  %51 = load ptr, ptr %2, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct._Action, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  %54 = getelementptr inbounds %struct._PseudoAction, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  %56 = load i32, ptr %1, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [50000 x ptr], ptr @goperators, i64 0, i64 %57
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  %60 = icmp ne ptr %55, %59
  br i1 %60, label %61, label %62

61:                                               ; preds = %50, %34, %24
  br label %64

62:                                               ; preds = %50, %45
  %63 = load ptr, ptr %2, align 8, !tbaa !9
  call void @print_lnf_Action(ptr noundef %63)
  br label %64

64:                                               ; preds = %62, %61
  %65 = load ptr, ptr %2, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct._Action, ptr %65, i32 0, i32 19
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  store ptr %67, ptr %2, align 8, !tbaa !9
  br label %16, !llvm.loop !21

68:                                               ; preds = %16
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %1, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %1, align 4, !tbaa !5
  br label %3, !llvm.loop !23

72:                                               ; preds = %3
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %74 = load ptr, ptr @gactions, align 8, !tbaa !9
  store ptr %74, ptr %2, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %91, %72
  %76 = load ptr, ptr %2, align 8, !tbaa !9
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %95

78:                                               ; preds = %75
  %79 = load ptr, ptr %2, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct._Action, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !13
  %82 = icmp ne ptr %81, null
  br i1 %82, label %90, label %83

83:                                               ; preds = %78
  %84 = load ptr, ptr %2, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct._Action, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !15
  %87 = icmp ne ptr %86, null
  br i1 %87, label %90, label %88

88:                                               ; preds = %83
  %89 = load ptr, ptr %2, align 8, !tbaa !9
  call void @print_lnf_Action(ptr noundef %89)
  br label %90

90:                                               ; preds = %88, %83, %78
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %2, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct._Action, ptr %92, i32 0, i32 19
  %94 = load ptr, ptr %93, align 8, !tbaa !20
  store ptr %94, ptr %2, align 8, !tbaa !9
  br label %75, !llvm.loop !24

95:                                               ; preds = %75
  %96 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  call void @print_State(ptr noundef byval(%struct._State) align 8 @ginitial_state)
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %109, %95
  %99 = load i32, ptr %1, align 4, !tbaa !5
  %100 = load i32, ptr @gnum_logic_goal, align 4, !tbaa !5
  %101 = icmp slt i32 %99, %100
  br i1 %101, label %102, label %112

102:                                              ; preds = %98
  %103 = load ptr, ptr @glogic_goal, align 8, !tbaa !9
  %104 = load i32, ptr %1, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %103, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  call void @print_ft_name(i32 noundef %107)
  %108 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  br label %109

109:                                              ; preds = %102
  %110 = load i32, ptr %1, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %1, align 4, !tbaa !5
  br label %98, !llvm.loop !25

112:                                              ; preds = %98
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %148, %112
  %114 = load i32, ptr %1, align 4, !tbaa !5
  %115 = load i32, ptr @gnum_lnf_goal, align 4, !tbaa !5
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %117, label %151

117:                                              ; preds = %113
  %118 = load ptr, ptr @glnf_goal_comp, align 8, !tbaa !9
  %119 = load i32, ptr %1, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i32, ptr %118, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  switch i32 %122, label %127 [
    i32 3004, label %123
    i32 3005, label %125
  ]

123:                                              ; preds = %117
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  br label %134

125:                                              ; preds = %117
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  br label %134

127:                                              ; preds = %117
  %128 = load ptr, ptr @glnf_goal_comp, align 8, !tbaa !9
  %129 = load i32, ptr %1, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds i32, ptr %128, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef %132)
  call void @exit(i32 noundef 1) #5
  unreachable

134:                                              ; preds = %125, %123
  %135 = load ptr, ptr @glnf_goal_lh, align 8, !tbaa !9
  %136 = load i32, ptr %1, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds ptr, ptr %135, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !9
  call void @print_LnfExpNode(ptr noundef %139)
  %140 = load ptr, ptr @glnf_goal_rh, align 8, !tbaa !9
  %141 = load i32, ptr %1, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds float, ptr %140, i64 %142
  %144 = load float, ptr %143, align 4, !tbaa !26
  %145 = fpext float %144 to double
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef %145)
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  br label %148

148:                                              ; preds = %134
  %149 = load i32, ptr %1, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %1, align 4, !tbaa !5
  br label %113, !llvm.loop !28

151:                                              ; preds = %113
  %152 = load ptr, ptr @gmetric, align 8, !tbaa !9
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %156

154:                                              ; preds = %151
  %155 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  call void @print_LnfExpNode(ptr noundef @glnf_metric)
  br label %158

156:                                              ; preds = %151
  %157 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  br label %158

158:                                              ; preds = %156, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret void
}

declare void @print_LnfExpNode(ptr noundef) #0

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

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

declare void @print_lnf_Action(ptr noundef) #0

declare void @print_State(ptr noundef byval(%struct._State) align 8) #0

declare void @print_ft_name(i32 noundef) #0

attributes #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 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_Operator", !10, i64 0, !7, i64 8, !6, i64 128, !7, i64 132, !6, i64 136, !7, i64 140, !7, i64 200, !10, i64 216, !10, i64 224, !7, i64 232}
!13 = !{!14, !10, i64 0}
!14 = !{!"_Action", !10, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !6, i64 32, !7, i64 36, !7, i64 96, !10, i64 160, !6, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !6, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !6, i64 232, !10, i64 240, !6, i64 248, !10, i64 256}
!15 = !{!14, !10, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_NormOperator", !10, i64 0, !6, i64 8, !7, i64 12, !7, i64 72, !7, i64 132, !6, i64 192, !7, i64 196, !10, i64 256, !6, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !6, i64 296, !10, i64 304, !7, i64 312}
!18 = !{!19, !10, i64 0}
!19 = !{!"_PseudoAction", !10, i64 0, !7, i64 8, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !6, i64 112, !10, i64 120, !6, i64 128}
!20 = !{!14, !10, i64 256}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !22}
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !7, i64 0}
!28 = distinct !{!28, !22}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._LnfExpNode = type { [25 x i32], [25 x float], i32, [25 x i32], [25 x float], i32, float }
%struct._State = type { ptr, i32, ptr, ptr }

@glnf_metric = external global %struct._LnfExpNode, align 4
@gactions = external local_unnamed_addr global ptr, align 8
@gmetric = external local_unnamed_addr global ptr, align 8
@gnum_operators = external local_unnamed_addr global i32, align 4
@.str.8 = external hidden unnamed_addr constant [45 x i8], align 1
@goperators = external local_unnamed_addr global [50000 x ptr], align 16
@.str.9 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [22 x i8], align 1
@ginitial_state = external global %struct._State, align 8
@.str.11 = external hidden unnamed_addr constant [13 x i8], align 1
@gnum_logic_goal = external local_unnamed_addr global i32, align 4
@glogic_goal = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@gnum_lnf_goal = external local_unnamed_addr global i32, align 4
@glnf_goal_comp = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [35 x i8], align 1
@glnf_goal_lh = external local_unnamed_addr global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@glnf_goal_rh = external local_unnamed_addr global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [34 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @print_lnf_representation() local_unnamed_addr #2 {
  %1 = load i32, ptr @gnum_operators, align 4, !tbaa !5
  %2 = icmp sgt i32 %1, 0
  br i1 %2, label %.lr.ph46, label %._crit_edge47

.lr.ph46:                                         ; preds = %0, %._crit_edge
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge ], [ 0, %0 ]
  %3 = getelementptr inbounds [50000 x ptr], ptr @goperators, i64 0, i64 %indvars.iv
  %4 = load ptr, ptr %3, align 8, !tbaa !9
  %5 = load ptr, ptr %4, align 8, !tbaa !11
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef %5)
  %.041 = load ptr, ptr @gactions, align 8, !tbaa !9
  %.not3442 = icmp eq ptr %.041, null
  br i1 %.not3442, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph46, %18
  %.043 = phi ptr [ %.0, %18 ], [ %.041, %.lr.ph46 ]
  %7 = load ptr, ptr %.043, align 8, !tbaa !13
  %.not35 = icmp eq ptr %7, null
  br i1 %.not35, label %8, label %11

8:                                                ; preds = %.lr.ph
  %9 = getelementptr inbounds i8, ptr %.043, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !15
  %.not36 = icmp eq ptr %10, null
  br i1 %.not36, label %18, label %.thread.thread

11:                                               ; preds = %.lr.ph
  %12 = load ptr, ptr %7, align 8, !tbaa !16
  %13 = load ptr, ptr %3, align 8, !tbaa !9
  %.not38 = icmp eq ptr %12, %13
  br i1 %.not38, label %.thread, label %18

.thread:                                          ; preds = %11
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.043, i64 8
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !15
  %.not39 = icmp eq ptr %.pre, null
  br i1 %.not39, label %17, label %.thread.thread

.thread.thread:                                   ; preds = %8, %.thread
  %14 = phi ptr [ %.pre, %.thread ], [ %10, %8 ]
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  %16 = load ptr, ptr %3, align 8, !tbaa !9
  %.not40 = icmp eq ptr %15, %16
  br i1 %.not40, label %17, label %18

17:                                               ; preds = %.thread.thread, %.thread
  tail call void @print_lnf_Action(ptr noundef nonnull %.043) #4
  br label %18

18:                                               ; preds = %8, %11, %.thread.thread, %17
  %19 = getelementptr inbounds i8, ptr %.043, i64 256
  %.0 = load ptr, ptr %19, align 8, !tbaa !9
  %.not34 = icmp eq ptr %.0, null
  br i1 %.not34, label %._crit_edge, label %.lr.ph, !llvm.loop !20

._crit_edge:                                      ; preds = %18, %.lr.ph46
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %20 = load i32, ptr @gnum_operators, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = icmp slt i64 %indvars.iv.next, %21
  br i1 %22, label %.lr.ph46, label %._crit_edge47, !llvm.loop !22

._crit_edge47:                                    ; preds = %._crit_edge, %0
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %.148 = load ptr, ptr @gactions, align 8, !tbaa !9
  %.not49 = icmp eq ptr %.148, null
  br i1 %.not49, label %._crit_edge53, label %.lr.ph52

.lr.ph52:                                         ; preds = %._crit_edge47, %29
  %.150 = phi ptr [ %.1, %29 ], [ %.148, %._crit_edge47 ]
  %24 = load ptr, ptr %.150, align 8, !tbaa !13
  %.not32 = icmp eq ptr %24, null
  br i1 %.not32, label %25, label %29

25:                                               ; preds = %.lr.ph52
  %26 = getelementptr inbounds i8, ptr %.150, i64 8
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %.not33 = icmp eq ptr %27, null
  br i1 %.not33, label %28, label %29

28:                                               ; preds = %25
  tail call void @print_lnf_Action(ptr noundef nonnull %.150) #4
  br label %29

29:                                               ; preds = %.lr.ph52, %25, %28
  %30 = getelementptr inbounds i8, ptr %.150, i64 256
  %.1 = load ptr, ptr %30, align 8, !tbaa !9
  %.not = icmp eq ptr %.1, null
  br i1 %.not, label %._crit_edge53, label %.lr.ph52, !llvm.loop !23

._crit_edge53:                                    ; preds = %29, %._crit_edge47
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  tail call void @print_State(ptr noundef nonnull byval(%struct._State) align 8 @ginitial_state) #4
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %33 = load i32, ptr @gnum_logic_goal, align 4, !tbaa !5
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph56, label %.preheader

.preheader:                                       ; preds = %.lr.ph56, %._crit_edge53
  %35 = load i32, ptr @gnum_lnf_goal, align 4, !tbaa !5
  %36 = icmp sgt i32 %35, 0
  br i1 %36, label %.lr.ph58, label %._crit_edge59

.lr.ph56:                                         ; preds = %._crit_edge53, %.lr.ph56
  %indvars.iv62 = phi i64 [ %indvars.iv.next63, %.lr.ph56 ], [ 0, %._crit_edge53 ]
  %37 = load ptr, ptr @glogic_goal, align 8, !tbaa !9
  %38 = getelementptr inbounds i32, ptr %37, i64 %indvars.iv62
  %39 = load i32, ptr %38, align 4, !tbaa !5
  tail call void @print_ft_name(i32 noundef %39) #4
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1
  %41 = load i32, ptr @gnum_logic_goal, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = icmp slt i64 %indvars.iv.next63, %42
  br i1 %43, label %.lr.ph56, label %.preheader, !llvm.loop !24

.lr.ph58:                                         ; preds = %.preheader, %50
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %50 ], [ 0, %.preheader ]
  %44 = load ptr, ptr @glnf_goal_comp, align 8, !tbaa !9
  %45 = getelementptr inbounds i32, ptr %44, i64 %indvars.iv65
  %46 = load i32, ptr %45, align 4, !tbaa !5
  switch i32 %46, label %48 [
    i32 3004, label %50
    i32 3005, label %47
  ]

47:                                               ; preds = %.lr.ph58
  br label %50

48:                                               ; preds = %.lr.ph58
  %49 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef %46)
  tail call void @exit(i32 noundef 1) #5
  unreachable

50:                                               ; preds = %.lr.ph58, %47
  %.str.14.sink = phi ptr [ @.str.14, %47 ], [ @.str.13, %.lr.ph58 ]
  %51 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.14.sink)
  %52 = load ptr, ptr @glnf_goal_lh, align 8, !tbaa !9
  %53 = getelementptr inbounds ptr, ptr %52, i64 %indvars.iv65
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  tail call void @print_LnfExpNode(ptr noundef %54) #4
  %55 = load ptr, ptr @glnf_goal_rh, align 8, !tbaa !9
  %56 = getelementptr inbounds float, ptr %55, i64 %indvars.iv65
  %57 = load float, ptr %56, align 4, !tbaa !25
  %58 = fpext float %57 to double
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef %58)
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %61 = load i32, ptr @gnum_lnf_goal, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = icmp slt i64 %indvars.iv.next66, %62
  br i1 %63, label %.lr.ph58, label %._crit_edge59, !llvm.loop !27

._crit_edge59:                                    ; preds = %50, %.preheader
  %64 = load ptr, ptr @gmetric, align 8, !tbaa !9
  %.not31 = icmp eq ptr %64, null
  br i1 %.not31, label %67, label %65

65:                                               ; preds = %._crit_edge59
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  tail call void @print_LnfExpNode(ptr noundef nonnull @glnf_metric) #4
  br label %69

67:                                               ; preds = %._crit_edge59
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  br label %69

69:                                               ; preds = %67, %65
  ret void
}

declare void @print_LnfExpNode(ptr noundef) local_unnamed_addr #3

declare void @print_lnf_Action(ptr noundef) local_unnamed_addr #3

declare void @print_State(ptr noundef byval(%struct._State) align 8) local_unnamed_addr #3

declare void @print_ft_name(i32 noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { 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 #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 }
attributes #5 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_Operator", !10, i64 0, !7, i64 8, !6, i64 128, !7, i64 132, !6, i64 136, !7, i64 140, !7, i64 200, !10, i64 216, !10, i64 224, !7, i64 232}
!13 = !{!14, !10, i64 0}
!14 = !{!"_Action", !10, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !6, i64 32, !7, i64 36, !7, i64 96, !10, i64 160, !6, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !6, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !6, i64 232, !10, i64 240, !6, i64 248, !10, i64 256}
!15 = !{!14, !10, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_NormOperator", !10, i64 0, !6, i64 8, !7, i64 12, !7, i64 72, !7, i64 132, !6, i64 192, !7, i64 196, !10, i64 256, !6, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !6, i64 296, !10, i64 304, !7, i64 312}
!18 = !{!19, !10, i64 0}
!19 = !{!"_PseudoAction", !10, i64 0, !7, i64 8, !10, i64 72, !6, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !6, i64 112, !10, i64 120, !6, i64 128}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !7, i64 0}
!27 = distinct !{!27, !21}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass