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

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

@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @print_ExpNode(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = icmp ne ptr %3, null
  br i1 %4, label %6, label %5

5:                                                ; preds = %1
  br label %90

6:                                                ; preds = %1
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct._ExpNode, ptr %7, i32 0, i32 0
  %9 = load i32, ptr %8, align 8, !tbaa !9
  switch i32 %9, label %85 [
    i32 1003, label %10
    i32 1004, label %19
    i32 1005, label %28
    i32 1006, label %37
    i32 1002, label %46
    i32 1001, label %52
    i32 1000, label %58
  ]

10:                                               ; preds = %6
  %11 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct._ExpNode, ptr %12, i32 0, i32 6
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  call void @print_ExpNode(ptr noundef %14)
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._ExpNode, ptr %15, i32 0, i32 7
  %17 = load ptr, ptr %16, align 8, !tbaa !14
  call void @print_ExpNode(ptr noundef %17)
  %18 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %90

19:                                               ; preds = %6
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._ExpNode, ptr %21, i32 0, i32 6
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  call void @print_ExpNode(ptr noundef %23)
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._ExpNode, ptr %24, i32 0, i32 7
  %26 = load ptr, ptr %25, align 8, !tbaa !14
  call void @print_ExpNode(ptr noundef %26)
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %90

28:                                               ; preds = %6
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._ExpNode, ptr %30, i32 0, i32 6
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  call void @print_ExpNode(ptr noundef %32)
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._ExpNode, ptr %33, i32 0, i32 7
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  call void @print_ExpNode(ptr noundef %35)
  %36 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %90

37:                                               ; preds = %6
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._ExpNode, ptr %39, i32 0, i32 6
  %41 = load ptr, ptr %40, align 8, !tbaa !13
  call void @print_ExpNode(ptr noundef %41)
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._ExpNode, ptr %42, i32 0, i32 7
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  call void @print_ExpNode(ptr noundef %44)
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %90

46:                                               ; preds = %6
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._ExpNode, ptr %48, i32 0, i32 5
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  call void @print_ExpNode(ptr noundef %50)
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  br label %90

52:                                               ; preds = %6
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._ExpNode, ptr %53, i32 0, i32 4
  %55 = load float, ptr %54, align 8, !tbaa !16
  %56 = fpext float %55 to double
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.49, double noundef %56)
  br label %90

58:                                               ; preds = %6
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._ExpNode, ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %67

63:                                               ; preds = %58
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._ExpNode, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  call void @print_Fluent(ptr noundef %66)
  br label %84

67:                                               ; preds = %58
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._ExpNode, ptr %68, i32 0, i32 2
  %70 = load i32, ptr %69, align 8, !tbaa !18
  %71 = icmp sge i32 %70, 0
  br i1 %71, label %72, label %81

72:                                               ; preds = %67
  %73 = load ptr, ptr %2, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._ExpNode, ptr %73, i32 0, i32 3
  %75 = load float, ptr %74, align 4, !tbaa !19
  %76 = fpext float %75 to double
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.50, double noundef %76)
  %78 = load ptr, ptr %2, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._ExpNode, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 8, !tbaa !18
  call void @print_fl_name(i32 noundef %80)
  br label %83

81:                                               ; preds = %67
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.51)
  br label %83

83:                                               ; preds = %81, %72
  br label %84

84:                                               ; preds = %83, %63
  br label %90

85:                                               ; preds = %6
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._ExpNode, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !9
  %89 = call i32 (ptr, ...) @printf(ptr noundef @.str.52, i32 noundef %88)
  br label %90

90:                                               ; preds = %85, %84, %52, %46, %37, %28, %19, %10, %5
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @print_Fluent(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @print_fl_name(i32 noundef) #1

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 = { 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" }

!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 = !{!"_ExpNode", !11, i64 0, !6, i64 8, !11, i64 16, !12, i64 20, !12, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !6, i64 40}
!14 = !{!10, !6, i64 48}
!15 = !{!10, !6, i64 32}
!16 = !{!10, !12, i64 24}
!17 = !{!10, !6, i64 8}
!18 = !{!10, !11, i64 16}
!19 = !{!10, !12, i64 20}


; 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.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [36 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @print_ExpNode(ptr noundef readonly %0) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %common.ret20, label %2

2:                                                ; preds = %1
  %3 = load i32, ptr %0, align 8, !tbaa !5
  switch i32 %3, label %58 [
    i32 1003, label %4
    i32 1004, label %11
    i32 1005, label %18
    i32 1006, label %25
    i32 1002, label %32
    i32 1001, label %37
    i32 1000, label %42
  ]

common.ret20:                                     ; preds = %45, %56, %50, %1, %58, %37, %32, %25, %18, %11, %4
  ret void

4:                                                ; preds = %2
  %5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  tail call void @print_ExpNode(ptr noundef %7)
  %8 = getelementptr inbounds i8, ptr %0, i64 48
  %9 = load ptr, ptr %8, align 8, !tbaa !13
  tail call void @print_ExpNode(ptr noundef %9)
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %common.ret20

11:                                               ; preds = %2
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %13 = getelementptr inbounds i8, ptr %0, i64 40
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  tail call void @print_ExpNode(ptr noundef %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %16 = load ptr, ptr %15, align 8, !tbaa !13
  tail call void @print_ExpNode(ptr noundef %16)
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %common.ret20

18:                                               ; preds = %2
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !12
  tail call void @print_ExpNode(ptr noundef %21)
  %22 = getelementptr inbounds i8, ptr %0, i64 48
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  tail call void @print_ExpNode(ptr noundef %23)
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %common.ret20

25:                                               ; preds = %2
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %27 = getelementptr inbounds i8, ptr %0, i64 40
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  tail call void @print_ExpNode(ptr noundef %28)
  %29 = getelementptr inbounds i8, ptr %0, i64 48
  %30 = load ptr, ptr %29, align 8, !tbaa !13
  tail call void @print_ExpNode(ptr noundef %30)
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %common.ret20

32:                                               ; preds = %2
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %34 = getelementptr inbounds i8, ptr %0, i64 32
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  tail call void @print_ExpNode(ptr noundef %35)
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %common.ret20

37:                                               ; preds = %2
  %38 = getelementptr inbounds i8, ptr %0, i64 24
  %39 = load float, ptr %38, align 8, !tbaa !15
  %40 = fpext float %39 to double
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49, double noundef %40)
  br label %common.ret20

42:                                               ; preds = %2
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %.not19 = icmp eq ptr %44, null
  br i1 %.not19, label %46, label %45

45:                                               ; preds = %42
  tail call void @print_Fluent(ptr noundef nonnull %44)
  br label %common.ret20

46:                                               ; preds = %42
  %47 = getelementptr inbounds i8, ptr %0, i64 16
  %48 = load i32, ptr %47, align 8, !tbaa !17
  %49 = icmp sgt i32 %48, -1
  br i1 %49, label %50, label %56

50:                                               ; preds = %46
  %51 = getelementptr inbounds i8, ptr %0, i64 20
  %52 = load float, ptr %51, align 4, !tbaa !18
  %53 = fpext float %52 to double
  %54 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50, double noundef %53)
  %55 = load i32, ptr %47, align 8, !tbaa !17
  tail call void @print_fl_name(i32 noundef %55)
  br label %common.ret20

56:                                               ; preds = %46
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  br label %common.ret20

58:                                               ; preds = %2
  %59 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52, i32 noundef %3)
  br label %common.ret20
}

; Function Attrs: nounwind uwtable
declare dso_local void @print_Fluent(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @print_fl_name(i32 noundef) local_unnamed_addr #1

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 = { 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" }

!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, !7, i64 0}
!6 = !{!"_ExpNode", !7, i64 0, !10, i64 8, !7, i64 16, !11, i64 20, !11, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 40}
!13 = !{!6, !10, i64 48}
!14 = !{!6, !10, i64 32}
!15 = !{!6, !11, i64 24}
!16 = !{!6, !10, i64 8}
!17 = !{!6, !7, i64 16}
!18 = !{!6, !11, i64 20}


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