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

; 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._command_line = type { [256 x i8], [256 x i8], [256 x i8], i32, i32, i32, i8, i32, float }
%struct._BfsNode = type { %struct._State, i32, i32, i32, float, float, float, ptr, i32, ptr, ptr, ptr }
%struct._State = type { ptr, i32, ptr, ptr }
%struct._OpConn = type { ptr, i8, ptr, i32, i8, i8, i32, i8, float }

@gcmd_line = external global %struct._command_line, align 4
@gop_conn = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@gnum_A = external global i32, align 4
@gA = external global ptr, align 8
@stdout = external global ptr, align 8
@lbfs_space_head = external dso_local global ptr, align 8
@ghmax = external global float, align 4
@gh_cost = external global float, align 4
@add_to_Astar_epsilon_space.fc = external hidden global i8, align 1
@add_to_Astar_epsilon_space.remaining = external hidden global ptr, align 8
@gnum_op_conn = external global i32, align 4
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 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

declare i32 @get_1P_and_A(ptr noundef) #1

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

declare void @print_op_name(i32 noundef) #1

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

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

declare i32 @fflush(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @copy_source_to_dest(ptr noundef, ptr noundef) #4

declare ptr @new_BfsNode() #1

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #5

; Function Attrs: nounwind uwtable
declare dso_local void @hash_bfs_node(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local void @add_to_Astar_epsilon_space(ptr noundef %0, i32 noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %19 = load i8, ptr @add_to_Astar_epsilon_space.fc, align 1, !tbaa !11
  %20 = icmp ne i8 %19, 0
  br i1 %20, label %21, label %25

21:                                               ; preds = %3
  %22 = load i32, ptr @gnum_op_conn, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = call noalias ptr @calloc(i64 noundef %23, i64 noundef 4) #7
  store ptr %24, ptr @add_to_Astar_epsilon_space.remaining, align 8, !tbaa !5
  store i8 0, ptr @add_to_Astar_epsilon_space.fc, align 1, !tbaa !11
  br label %25

25:                                               ; preds = %21, %3
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %43

28:                                               ; preds = %25
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._BfsNode, ptr %29, i32 0, i32 2
  %31 = load i32, ptr %30, align 4, !tbaa !12
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %11, align 4, !tbaa !9
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._BfsNode, ptr %33, i32 0, i32 4
  %35 = load float, ptr %34, align 4, !tbaa !16
  %36 = load ptr, ptr @gop_conn, align 8, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds %struct._OpConn, ptr %36, i64 %38
  %40 = getelementptr inbounds %struct._OpConn, ptr %39, i32 0, i32 8
  %41 = load float, ptr %40, align 8, !tbaa !17
  %42 = fadd float %35, %41
  store float %42, ptr %13, align 4, !tbaa !19
  br label %44

43:                                               ; preds = %25
  store i32 0, ptr %11, align 4, !tbaa !9
  store float 0.000000e+00, ptr %13, align 4, !tbaa !19
  br label %44

44:                                               ; preds = %43, %28
  %45 = load float, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 8), align 4, !tbaa !20
  %46 = fcmp une float %45, -1.000000e+00
  br i1 %46, label %47, label %52

47:                                               ; preds = %44
  %48 = load float, ptr %13, align 4, !tbaa !19
  %49 = load float, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 8), align 4, !tbaa !20
  %50 = fcmp ogt float %48, %49
  br i1 %50, label %51, label %52

51:                                               ; preds = %47
  store i32 1, ptr %18, align 4
  br label %214

52:                                               ; preds = %47, %44
  %53 = call ptr @new_BfsNode()
  store ptr %53, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._BfsNode, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  call void @copy_source_to_dest(ptr noundef %55, ptr noundef %56)
  %57 = load i32, ptr %5, align 4, !tbaa !9
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct._BfsNode, ptr %58, i32 0, i32 1
  store i32 %57, ptr %59, align 8, !tbaa !22
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._BfsNode, ptr %61, i32 0, i32 9
  store ptr %60, ptr %62, align 8, !tbaa !23
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = load float, ptr %13, align 4, !tbaa !19
  %65 = call zeroext i8 @Astar_better_state_hashed(ptr noundef %63, float noundef %64)
  %66 = icmp ne i8 %65, 0
  br i1 %66, label %67, label %69

67:                                               ; preds = %52
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %68) #6
  store i32 1, ptr %18, align 4
  br label %214

69:                                               ; preds = %52
  %70 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 4), align 4, !tbaa !24
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %85

72:                                               ; preds = %69
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.17)
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  call void @print_state_trace(ptr noundef %74)
  %75 = load i32, ptr %5, align 4, !tbaa !9
  %76 = icmp sge i32 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %72
  %78 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %79 = load i32, ptr %5, align 4, !tbaa !9
  call void @print_op_name(i32 noundef %79)
  br label %82

80:                                               ; preds = %72
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.19)
  br label %82

82:                                               ; preds = %80, %77
  %83 = load ptr, ptr @stdout, align 8, !tbaa !5
  %84 = call i32 @fflush(ptr noundef %83)
  br label %85

85:                                               ; preds = %82, %69
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = call i32 @get_1P_and_A(ptr noundef %86)
  store i32 %87, ptr %12, align 4, !tbaa !9
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = icmp eq i32 %88, -1
  br i1 %89, label %90, label %92

90:                                               ; preds = %85
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %91) #6
  store i32 1, ptr %18, align 4
  br label %214

92:                                               ; preds = %85
  %93 = load float, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 8), align 4, !tbaa !20
  %94 = fcmp une float %93, -1.000000e+00
  br i1 %94, label %95, label %103

95:                                               ; preds = %92
  %96 = load float, ptr %13, align 4, !tbaa !19
  %97 = load float, ptr @ghmax, align 4, !tbaa !19
  %98 = fadd float %96, %97
  %99 = load float, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 8), align 4, !tbaa !20
  %100 = fcmp ogt float %98, %99
  br i1 %100, label %101, label %103

101:                                              ; preds = %95
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %102) #6
  store i32 1, ptr %18, align 4
  br label %214

103:                                              ; preds = %95, %92
  %104 = load float, ptr @gh_cost, align 4, !tbaa !19
  store float %104, ptr %14, align 4, !tbaa !19
  %105 = load float, ptr %13, align 4, !tbaa !19
  %106 = load float, ptr %14, align 4, !tbaa !19
  %107 = fadd float %105, %106
  store float %107, ptr %15, align 4, !tbaa !19
  %108 = load i32, ptr %12, align 4, !tbaa !9
  %109 = load ptr, ptr %9, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._BfsNode, ptr %109, i32 0, i32 3
  store i32 %108, ptr %110, align 8, !tbaa !25
  %111 = load i32, ptr %11, align 4, !tbaa !9
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._BfsNode, ptr %112, i32 0, i32 2
  store i32 %111, ptr %113, align 4, !tbaa !12
  %114 = load float, ptr %13, align 4, !tbaa !19
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._BfsNode, ptr %115, i32 0, i32 4
  store float %114, ptr %116, align 4, !tbaa !16
  %117 = load float, ptr %14, align 4, !tbaa !19
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._BfsNode, ptr %118, i32 0, i32 5
  store float %117, ptr %119, align 8, !tbaa !26
  %120 = load float, ptr %15, align 4, !tbaa !19
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._BfsNode, ptr %121, i32 0, i32 6
  store float %120, ptr %122, align 4, !tbaa !27
  %123 = load i32, ptr @gnum_A, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = call noalias ptr @calloc(i64 noundef %124, i64 noundef 4) #7
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._BfsNode, ptr %126, i32 0, i32 7
  store ptr %125, ptr %127, align 8, !tbaa !28
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %163, %103
  %129 = load i32, ptr %16, align 4, !tbaa !9
  %130 = load i32, ptr @gnum_A, align 4, !tbaa !9
  %131 = icmp slt i32 %129, %130
  br i1 %131, label %132, label %166

132:                                              ; preds = %128
  %133 = load ptr, ptr @gop_conn, align 8, !tbaa !5
  %134 = load ptr, ptr @gA, align 8, !tbaa !5
  %135 = load i32, ptr %16, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds i32, ptr %134, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds %struct._OpConn, ptr %133, i64 %139
  %141 = getelementptr inbounds %struct._OpConn, ptr %140, i32 0, i32 1
  %142 = load i8, ptr %141, align 8, !tbaa !29
  %143 = icmp ne i8 %142, 0
  br i1 %143, label %144, label %151

144:                                              ; preds = %132
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %146 = load ptr, ptr @gA, align 8, !tbaa !5
  %147 = load i32, ptr %16, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i32, ptr %146, i64 %148
  %150 = load i32, ptr %149, align 4, !tbaa !9
  call void @print_op_name(i32 noundef %150)
  call void @exit(i32 noundef 1) #8
  unreachable

151:                                              ; preds = %132
  %152 = load ptr, ptr @gA, align 8, !tbaa !5
  %153 = load i32, ptr %16, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds i32, ptr %152, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !9
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._BfsNode, ptr %157, i32 0, i32 7
  %159 = load ptr, ptr %158, align 8, !tbaa !28
  %160 = load i32, ptr %16, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i32, ptr %159, i64 %161
  store i32 %156, ptr %162, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %151
  %164 = load i32, ptr %16, align 4, !tbaa !9
  %165 = add nsw i32 %164, 1
  store i32 %165, ptr %16, align 4, !tbaa !9
  br label %128, !llvm.loop !30

166:                                              ; preds = %128
  %167 = load i32, ptr @gnum_A, align 4, !tbaa !9
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._BfsNode, ptr %168, i32 0, i32 8
  store i32 %167, ptr %169, align 8, !tbaa !32
  %170 = load ptr, ptr @lbfs_space_head, align 8, !tbaa !5
  store ptr %170, ptr %10, align 8, !tbaa !5
  br label %171

171:                                              ; preds = %186, %166
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._BfsNode, ptr %172, i32 0, i32 10
  %174 = load ptr, ptr %173, align 8, !tbaa !33
  %175 = icmp ne ptr %174, null
  br i1 %175, label %176, label %190

176:                                              ; preds = %171
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._BfsNode, ptr %177, i32 0, i32 10
  %179 = load ptr, ptr %178, align 8, !tbaa !33
  %180 = getelementptr inbounds %struct._BfsNode, ptr %179, i32 0, i32 6
  %181 = load float, ptr %180, align 4, !tbaa !27
  %182 = load float, ptr %15, align 4, !tbaa !19
  %183 = fcmp ogt float %181, %182
  br i1 %183, label %184, label %185

184:                                              ; preds = %176
  br label %190

185:                                              ; preds = %176
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr %10, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._BfsNode, ptr %187, i32 0, i32 10
  %189 = load ptr, ptr %188, align 8, !tbaa !33
  store ptr %189, ptr %10, align 8, !tbaa !5
  br label %171, !llvm.loop !34

190:                                              ; preds = %184, %171
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct._BfsNode, ptr %191, i32 0, i32 10
  %193 = load ptr, ptr %192, align 8, !tbaa !33
  %194 = load ptr, ptr %9, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct._BfsNode, ptr %194, i32 0, i32 10
  store ptr %193, ptr %195, align 8, !tbaa !33
  %196 = load ptr, ptr %10, align 8, !tbaa !5
  %197 = load ptr, ptr %9, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._BfsNode, ptr %197, i32 0, i32 11
  store ptr %196, ptr %198, align 8, !tbaa !35
  %199 = load ptr, ptr %9, align 8, !tbaa !5
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct._BfsNode, ptr %200, i32 0, i32 10
  store ptr %199, ptr %201, align 8, !tbaa !33
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._BfsNode, ptr %202, i32 0, i32 10
  %204 = load ptr, ptr %203, align 8, !tbaa !33
  %205 = icmp ne ptr %204, null
  br i1 %205, label %206, label %212

206:                                              ; preds = %190
  %207 = load ptr, ptr %9, align 8, !tbaa !5
  %208 = load ptr, ptr %9, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct._BfsNode, ptr %208, i32 0, i32 10
  %210 = load ptr, ptr %209, align 8, !tbaa !33
  %211 = getelementptr inbounds %struct._BfsNode, ptr %210, i32 0, i32 11
  store ptr %207, ptr %211, align 8, !tbaa !35
  br label %212

212:                                              ; preds = %206, %190
  %213 = load ptr, ptr %9, align 8, !tbaa !5
  call void @hash_bfs_node(ptr noundef %213)
  store i32 0, ptr %18, align 4
  br label %214

214:                                              ; preds = %212, %101, %90, %67, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  %215 = load i32, ptr %18, align 4
  switch i32 %215, label %217 [
    i32 0, label %216
    i32 1, label %216
  ]

216:                                              ; preds = %214, %214
  ret void

217:                                              ; preds = %214
  unreachable
}

; Function Attrs: nounwind uwtable
declare dso_local void @print_state_trace(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 allocsize(0,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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 36}
!13 = !{!"_BfsNode", !14, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !6, i64 56, !10, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!14 = !{!"_State", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"float", !7, i64 0}
!16 = !{!13, !15, i64 44}
!17 = !{!18, !15, i64 40}
!18 = !{!"_OpConn", !6, i64 0, !7, i64 8, !6, i64 16, !10, i64 24, !7, i64 28, !7, i64 29, !10, i64 32, !7, i64 36, !15, i64 40}
!19 = !{!15, !15, i64 0}
!20 = !{!21, !15, i64 788}
!21 = !{!"_command_line", !7, i64 0, !7, i64 256, !7, i64 512, !10, i64 768, !10, i64 772, !10, i64 776, !7, i64 780, !10, i64 784, !15, i64 788}
!22 = !{!13, !10, i64 32}
!23 = !{!13, !6, i64 72}
!24 = !{!21, !10, i64 772}
!25 = !{!13, !10, i64 40}
!26 = !{!13, !15, i64 48}
!27 = !{!13, !15, i64 52}
!28 = !{!13, !6, i64 56}
!29 = !{!18, !7, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!13, !10, i64 64}
!33 = !{!13, !6, i64 80}
!34 = distinct !{!34, !31}
!35 = !{!13, !6, i64 88}


; 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._command_line = type { [256 x i8], [256 x i8], [256 x i8], i32, i32, i32, i8, i32, float }
%struct._OpConn = type { ptr, i8, ptr, i32, i8, i8, i32, i8, float }

@gcmd_line = external local_unnamed_addr global %struct._command_line, align 4
@gop_conn = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@gnum_A = external local_unnamed_addr global i32, align 4
@gA = external local_unnamed_addr global ptr, align 8
@stdout = external local_unnamed_addr global ptr, align 8
@lbfs_space_head = external dso_local local_unnamed_addr global ptr, align 8
@ghmax = external local_unnamed_addr global float, align 4
@gh_cost = external local_unnamed_addr global float, align 4
@add_to_Astar_epsilon_space.fc = external hidden local_unnamed_addr global i8, align 1
@add_to_Astar_epsilon_space.remaining = external hidden local_unnamed_addr global ptr, align 8
@gnum_op_conn = external local_unnamed_addr global i32, align 4
@.str.17 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [19 x i8], align 1

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

declare i32 @get_1P_and_A(ptr noundef) local_unnamed_addr #1

declare void @print_op_name(i32 noundef) local_unnamed_addr #1

; 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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @copy_source_to_dest(ptr noundef, ptr noundef) local_unnamed_addr #4

declare ptr @new_BfsNode() local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #5

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

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

; Function Attrs: nounwind uwtable
define dso_local void @add_to_Astar_epsilon_space(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #4 {
  %4 = load i8, ptr @add_to_Astar_epsilon_space.fc, align 1, !tbaa !5
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %9, label %5

5:                                                ; preds = %3
  %6 = load i32, ptr @gnum_op_conn, align 4, !tbaa !8
  %7 = sext i32 %6 to i64
  %8 = tail call noalias ptr @calloc(i64 noundef %7, i64 noundef 4) #6
  store ptr %8, ptr @add_to_Astar_epsilon_space.remaining, align 8, !tbaa !10
  store i8 0, ptr @add_to_Astar_epsilon_space.fc, align 1, !tbaa !5
  br label %9

9:                                                ; preds = %5, %3
  %.not67 = icmp eq ptr %2, null
  br i1 %.not67, label %21, label %10

10:                                               ; preds = %9
  %11 = getelementptr inbounds i8, ptr %2, i64 36
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %13 = add nsw i32 %12, 1
  %14 = getelementptr inbounds i8, ptr %2, i64 44
  %15 = load float, ptr %14, align 4, !tbaa !16
  %16 = load ptr, ptr @gop_conn, align 8, !tbaa !10
  %17 = sext i32 %1 to i64
  %18 = getelementptr inbounds %struct._OpConn, ptr %16, i64 %17, i32 8
  %19 = load float, ptr %18, align 8, !tbaa !17
  %20 = fadd float %15, %19
  br label %21

21:                                               ; preds = %9, %10
  %.058 = phi float [ %20, %10 ], [ 0.000000e+00, %9 ]
  %.057 = phi i32 [ %13, %10 ], [ 0, %9 ]
  %22 = load float, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 788), align 4, !tbaa !19
  %23 = fcmp une float %22, -1.000000e+00
  %24 = fcmp ogt float %.058, %22
  %or.cond = select i1 %23, i1 %24, i1 false
  br i1 %or.cond, label %100, label %25

25:                                               ; preds = %21
  %26 = tail call ptr @new_BfsNode() #7
  tail call void @copy_source_to_dest(ptr noundef %26, ptr noundef %0)
  %27 = getelementptr inbounds i8, ptr %26, i64 32
  store i32 %1, ptr %27, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %26, i64 72
  store ptr %2, ptr %28, align 8, !tbaa !22
  %29 = tail call zeroext i8 @Astar_better_state_hashed(ptr noundef %26, float noundef %.058)
  %.not68 = icmp eq i8 %29, 0
  br i1 %.not68, label %31, label %30

30:                                               ; preds = %25
  tail call void @free(ptr noundef nonnull %26) #7
  br label %100

31:                                               ; preds = %25
  %32 = load i32, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 772), align 4, !tbaa !23
  %.not69 = icmp eq i32 %32, 0
  br i1 %.not69, label %43, label %33

33:                                               ; preds = %31
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17)
  tail call void @print_state_trace(ptr noundef %2)
  %35 = icmp sgt i32 %1, -1
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  tail call void @print_op_name(i32 noundef %1) #7
  br label %40

38:                                               ; preds = %33
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19)
  br label %40

40:                                               ; preds = %38, %36
  %41 = load ptr, ptr @stdout, align 8, !tbaa !10
  %42 = tail call i32 @fflush(ptr noundef %41)
  br label %43

43:                                               ; preds = %40, %31
  %44 = tail call i32 @get_1P_and_A(ptr noundef %0) #7
  %45 = icmp eq i32 %44, -1
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  tail call void @free(ptr noundef nonnull %26) #7
  br label %100

47:                                               ; preds = %43
  %48 = load float, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 788), align 4, !tbaa !19
  %49 = fcmp une float %48, -1.000000e+00
  br i1 %49, label %50, label %55

50:                                               ; preds = %47
  %51 = load float, ptr @ghmax, align 4, !tbaa !24
  %52 = fadd float %.058, %51
  %53 = fcmp ogt float %52, %48
  br i1 %53, label %54, label %55

54:                                               ; preds = %50
  tail call void @free(ptr noundef nonnull %26) #7
  br label %100

55:                                               ; preds = %50, %47
  %56 = load float, ptr @gh_cost, align 4, !tbaa !24
  %57 = fadd float %.058, %56
  %58 = getelementptr inbounds i8, ptr %26, i64 40
  store i32 %44, ptr %58, align 8, !tbaa !25
  %59 = getelementptr inbounds i8, ptr %26, i64 36
  store i32 %.057, ptr %59, align 4, !tbaa !12
  %60 = getelementptr inbounds i8, ptr %26, i64 44
  store float %.058, ptr %60, align 4, !tbaa !16
  %61 = getelementptr inbounds i8, ptr %26, i64 48
  store float %56, ptr %61, align 8, !tbaa !26
  %62 = getelementptr inbounds i8, ptr %26, i64 52
  store float %57, ptr %62, align 4, !tbaa !27
  %63 = load i32, ptr @gnum_A, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = tail call noalias ptr @calloc(i64 noundef %64, i64 noundef 4) #6
  %66 = getelementptr inbounds i8, ptr %26, i64 56
  store ptr %65, ptr %66, align 8, !tbaa !28
  %67 = icmp sgt i32 %63, 0
  br i1 %67, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %55
  %68 = load ptr, ptr @gop_conn, align 8, !tbaa !10
  %69 = load ptr, ptr @gA, align 8, !tbaa !10
  %wide.trip.count = zext nneg i32 %63 to i64
  br label %70

70:                                               ; preds = %.lr.ph, %81
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %81 ]
  %71 = getelementptr inbounds i32, ptr %69, i64 %indvars.iv
  %72 = load i32, ptr %71, align 4, !tbaa !8
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds %struct._OpConn, ptr %68, i64 %73, i32 1
  %75 = load i8, ptr %74, align 8, !tbaa !29
  %.not72 = icmp eq i8 %75, 0
  br i1 %.not72, label %81, label %76

76:                                               ; preds = %70
  %77 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %78 = load ptr, ptr @gA, align 8, !tbaa !10
  %79 = getelementptr inbounds i32, ptr %78, i64 %indvars.iv
  %80 = load i32, ptr %79, align 4, !tbaa !8
  tail call void @print_op_name(i32 noundef %80) #7
  tail call void @exit(i32 noundef 1) #8
  unreachable

81:                                               ; preds = %70
  %82 = getelementptr inbounds i32, ptr %65, i64 %indvars.iv
  store i32 %72, ptr %82, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %70, !llvm.loop !30

._crit_edge:                                      ; preds = %81, %55
  %83 = getelementptr inbounds i8, ptr %26, i64 64
  store i32 %63, ptr %83, align 8, !tbaa !32
  %84 = load ptr, ptr @lbfs_space_head, align 8, !tbaa !10
  br label %85

85:                                               ; preds = %88, %._crit_edge
  %.0 = phi ptr [ %84, %._crit_edge ], [ %87, %88 ]
  %86 = getelementptr inbounds i8, ptr %.0, i64 80
  %87 = load ptr, ptr %86, align 8, !tbaa !33
  %.not70 = icmp eq ptr %87, null
  br i1 %.not70, label %92, label %88

88:                                               ; preds = %85
  %89 = getelementptr inbounds i8, ptr %87, i64 52
  %90 = load float, ptr %89, align 4, !tbaa !27
  %91 = fcmp ogt float %90, %57
  br i1 %91, label %92, label %85, !llvm.loop !34

92:                                               ; preds = %88, %85
  %93 = getelementptr inbounds i8, ptr %.0, i64 80
  %94 = getelementptr inbounds i8, ptr %26, i64 80
  store ptr %87, ptr %94, align 8, !tbaa !33
  %95 = getelementptr inbounds i8, ptr %26, i64 88
  store ptr %.0, ptr %95, align 8, !tbaa !35
  store ptr %26, ptr %93, align 8, !tbaa !33
  %96 = load ptr, ptr %94, align 8, !tbaa !33
  %.not71 = icmp eq ptr %96, null
  br i1 %.not71, label %99, label %97

97:                                               ; preds = %92
  %98 = getelementptr inbounds i8, ptr %96, i64 88
  store ptr %26, ptr %98, align 8, !tbaa !35
  br label %99

99:                                               ; preds = %97, %92
  tail call void @hash_bfs_node(ptr noundef nonnull %26)
  br label %100

100:                                              ; preds = %21, %99, %54, %46, %30
  ret void
}

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

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 = { "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 = { 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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(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 #6 = { nounwind allocsize(0,1) }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !9, i64 36}
!13 = !{!"_BfsNode", !14, i64 0, !9, i64 32, !9, i64 36, !9, i64 40, !15, i64 44, !15, i64 48, !15, i64 52, !11, i64 56, !9, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!14 = !{!"_State", !11, i64 0, !9, i64 8, !11, i64 16, !11, i64 24}
!15 = !{!"float", !6, i64 0}
!16 = !{!13, !15, i64 44}
!17 = !{!18, !15, i64 40}
!18 = !{!"_OpConn", !11, i64 0, !6, i64 8, !11, i64 16, !9, i64 24, !6, i64 28, !6, i64 29, !9, i64 32, !6, i64 36, !15, i64 40}
!19 = !{!20, !15, i64 788}
!20 = !{!"_command_line", !6, i64 0, !6, i64 256, !6, i64 512, !9, i64 768, !9, i64 772, !9, i64 776, !6, i64 780, !9, i64 784, !15, i64 788}
!21 = !{!13, !9, i64 32}
!22 = !{!13, !11, i64 72}
!23 = !{!20, !9, i64 772}
!24 = !{!15, !15, i64 0}
!25 = !{!13, !9, i64 40}
!26 = !{!13, !15, i64 48}
!27 = !{!13, !15, i64 52}
!28 = !{!13, !11, i64 56}
!29 = !{!18, !6, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!13, !9, i64 64}
!33 = !{!13, !11, i64 80}
!34 = distinct !{!34, !31}
!35 = !{!13, !11, i64 88}


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