; 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
@gnum_H = external global i32, align 4
@gop_conn = external global ptr, align 8
@gH = 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
@lbfs_space_head = external dso_local global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [44 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 @get_1P_and_H(ptr noundef) #1

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 uwtable
declare dso_local void @copy_source_to_dest(ptr noundef, ptr noundef) #3

declare ptr @new_BfsNode() #1

; Function Attrs: nounwind uwtable
define dso_local void @add_to_bfs_space(ptr noundef %0, i32 noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = 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 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = call zeroext i8 @superior_bfs_state_hashed(ptr noundef %13)
  %15 = icmp ne i8 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %3
  store i32 1, ptr %12, align 4
  br label %219

17:                                               ; preds = %3
  %18 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %23, label %20

20:                                               ; preds = %17
  %21 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %22 = icmp eq i32 %21, 1
  br i1 %22, label %23, label %26

23:                                               ; preds = %20, %17
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = call i32 @get_1P_and_A(ptr noundef %24)
  store i32 %25, ptr %10, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %23, %20
  %27 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %28 = icmp eq i32 %27, 2
  br i1 %28, label %29, label %32

29:                                               ; preds = %26
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call i32 @get_1P_and_H(ptr noundef %30)
  store i32 %31, ptr %10, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %29, %26
  %33 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %34 = icmp sgt i32 0, %33
  br i1 %34, label %38, label %35

35:                                               ; preds = %32
  %36 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %37 = icmp sgt i32 %36, 2
  br i1 %37, label %38, label %40

38:                                               ; preds = %35, %32
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  call void @exit(i32 noundef 1) #6
  unreachable

40:                                               ; preds = %35
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = icmp eq i32 %41, -1
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  store i32 1, ptr %12, align 4
  br label %219

44:                                               ; preds = %40
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %52

47:                                               ; preds = %44
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._BfsNode, ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 4, !tbaa !14
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %9, align 4, !tbaa !9
  br label %53

52:                                               ; preds = %44
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %52, %47
  %54 = call ptr @new_BfsNode()
  store ptr %54, ptr %7, align 8, !tbaa !5
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._BfsNode, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  call void @copy_source_to_dest(ptr noundef %56, ptr noundef %57)
  %58 = load i32, ptr %5, align 4, !tbaa !9
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._BfsNode, ptr %59, i32 0, i32 1
  store i32 %58, ptr %60, align 8, !tbaa !17
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._BfsNode, ptr %62, i32 0, i32 9
  store ptr %61, ptr %63, align 8, !tbaa !18
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._BfsNode, ptr %65, i32 0, i32 3
  store i32 %64, ptr %66, align 8, !tbaa !19
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._BfsNode, ptr %68, i32 0, i32 2
  store i32 %67, ptr %69, align 4, !tbaa !14
  %70 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %75, label %72

72:                                               ; preds = %53
  %73 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %74 = icmp eq i32 %73, 1
  br i1 %74, label %75, label %123

75:                                               ; preds = %72, %53
  %76 = load i32, ptr @gnum_A, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = call noalias ptr @calloc(i64 noundef %77, i64 noundef 4) #7
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._BfsNode, ptr %79, i32 0, i32 7
  store ptr %78, ptr %80, align 8, !tbaa !20
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %116, %75
  %82 = load i32, ptr %11, align 4, !tbaa !9
  %83 = load i32, ptr @gnum_A, align 4, !tbaa !9
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %85, label %119

85:                                               ; preds = %81
  %86 = load ptr, ptr @gop_conn, align 8, !tbaa !5
  %87 = load ptr, ptr @gA, align 8, !tbaa !5
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds %struct._OpConn, ptr %86, i64 %92
  %94 = getelementptr inbounds %struct._OpConn, ptr %93, i32 0, i32 1
  %95 = load i8, ptr %94, align 8, !tbaa !21
  %96 = icmp ne i8 %95, 0
  br i1 %96, label %97, label %104

97:                                               ; preds = %85
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %99 = load ptr, ptr @gA, align 8, !tbaa !5
  %100 = load i32, ptr %11, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %99, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !9
  call void @print_op_name(i32 noundef %103)
  call void @exit(i32 noundef 1) #6
  unreachable

104:                                              ; preds = %85
  %105 = load ptr, ptr @gA, align 8, !tbaa !5
  %106 = load i32, ptr %11, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i32, ptr %105, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = load ptr, ptr %7, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._BfsNode, ptr %110, i32 0, i32 7
  %112 = load ptr, ptr %111, align 8, !tbaa !20
  %113 = load i32, ptr %11, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds i32, ptr %112, i64 %114
  store i32 %109, ptr %115, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %104
  %117 = load i32, ptr %11, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %11, align 4, !tbaa !9
  br label %81, !llvm.loop !23

119:                                              ; preds = %81
  %120 = load i32, ptr @gnum_A, align 4, !tbaa !9
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._BfsNode, ptr %121, i32 0, i32 8
  store i32 %120, ptr %122, align 8, !tbaa !25
  br label %123

123:                                              ; preds = %119, %72
  %124 = load i32, ptr getelementptr inbounds (%struct._command_line, ptr @gcmd_line, i32 0, i32 5), align 4, !tbaa !11
  %125 = icmp eq i32 %124, 2
  br i1 %125, label %126, label %174

126:                                              ; preds = %123
  %127 = load i32, ptr @gnum_H, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = call noalias ptr @calloc(i64 noundef %128, i64 noundef 4) #7
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._BfsNode, ptr %130, i32 0, i32 7
  store ptr %129, ptr %131, align 8, !tbaa !20
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %167, %126
  %133 = load i32, ptr %11, align 4, !tbaa !9
  %134 = load i32, ptr @gnum_H, align 4, !tbaa !9
  %135 = icmp slt i32 %133, %134
  br i1 %135, label %136, label %170

136:                                              ; preds = %132
  %137 = load ptr, ptr @gop_conn, align 8, !tbaa !5
  %138 = load ptr, ptr @gH, align 8, !tbaa !5
  %139 = load i32, ptr %11, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i32, ptr %138, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds %struct._OpConn, ptr %137, i64 %143
  %145 = getelementptr inbounds %struct._OpConn, ptr %144, i32 0, i32 1
  %146 = load i8, ptr %145, align 8, !tbaa !21
  %147 = icmp ne i8 %146, 0
  br i1 %147, label %148, label %155

148:                                              ; preds = %136
  %149 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  %150 = load ptr, ptr @gH, align 8, !tbaa !5
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds i32, ptr %150, i64 %152
  %154 = load i32, ptr %153, align 4, !tbaa !9
  call void @print_op_name(i32 noundef %154)
  call void @exit(i32 noundef 1) #6
  unreachable

155:                                              ; preds = %136
  %156 = load ptr, ptr @gH, align 8, !tbaa !5
  %157 = load i32, ptr %11, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds i32, ptr %156, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._BfsNode, ptr %161, i32 0, i32 7
  %163 = load ptr, ptr %162, align 8, !tbaa !20
  %164 = load i32, ptr %11, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds i32, ptr %163, i64 %165
  store i32 %160, ptr %166, align 4, !tbaa !9
  br label %167

167:                                              ; preds = %155
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %11, align 4, !tbaa !9
  br label %132, !llvm.loop !26

170:                                              ; preds = %132
  %171 = load i32, ptr @gnum_H, align 4, !tbaa !9
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._BfsNode, ptr %172, i32 0, i32 8
  store i32 %171, ptr %173, align 8, !tbaa !25
  br label %174

174:                                              ; preds = %170, %123
  %175 = load ptr, ptr @lbfs_space_head, align 8, !tbaa !5
  store ptr %175, ptr %8, align 8, !tbaa !5
  br label %176

176:                                              ; preds = %191, %174
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._BfsNode, ptr %177, i32 0, i32 10
  %179 = load ptr, ptr %178, align 8, !tbaa !27
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %195

181:                                              ; preds = %176
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct._BfsNode, ptr %182, i32 0, i32 10
  %184 = load ptr, ptr %183, align 8, !tbaa !27
  %185 = getelementptr inbounds %struct._BfsNode, ptr %184, i32 0, i32 3
  %186 = load i32, ptr %185, align 8, !tbaa !19
  %187 = load i32, ptr %10, align 4, !tbaa !9
  %188 = icmp sge i32 %186, %187
  br i1 %188, label %189, label %190

189:                                              ; preds = %181
  br label %195

190:                                              ; preds = %181
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %8, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._BfsNode, ptr %192, i32 0, i32 10
  %194 = load ptr, ptr %193, align 8, !tbaa !27
  store ptr %194, ptr %8, align 8, !tbaa !5
  br label %176, !llvm.loop !28

195:                                              ; preds = %189, %176
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct._BfsNode, ptr %196, i32 0, i32 10
  %198 = load ptr, ptr %197, align 8, !tbaa !27
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct._BfsNode, ptr %199, i32 0, i32 10
  store ptr %198, ptr %200, align 8, !tbaa !27
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._BfsNode, ptr %202, i32 0, i32 11
  store ptr %201, ptr %203, align 8, !tbaa !29
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = load ptr, ptr %8, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._BfsNode, ptr %205, i32 0, i32 10
  store ptr %204, ptr %206, align 8, !tbaa !27
  %207 = load ptr, ptr %7, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct._BfsNode, ptr %207, i32 0, i32 10
  %209 = load ptr, ptr %208, align 8, !tbaa !27
  %210 = icmp ne ptr %209, null
  br i1 %210, label %211, label %217

211:                                              ; preds = %195
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._BfsNode, ptr %213, i32 0, i32 10
  %215 = load ptr, ptr %214, align 8, !tbaa !27
  %216 = getelementptr inbounds %struct._BfsNode, ptr %215, i32 0, i32 11
  store ptr %212, ptr %216, align 8, !tbaa !29
  br label %217

217:                                              ; preds = %211, %195
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  call void @hash_bfs_node(ptr noundef %218)
  store i32 0, ptr %12, align 4
  br label %219

219:                                              ; preds = %217, %43, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %220 = load i32, ptr %12, align 4
  switch i32 %220, label %222 [
    i32 0, label %221
    i32 1, label %221
  ]

221:                                              ; preds = %219, %219
  ret void

222:                                              ; preds = %219
  unreachable
}

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

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

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

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 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind allocsize(0,1) }

!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 = !{!12, !10, i64 776}
!12 = !{!"_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, !13, i64 788}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !10, i64 36}
!15 = !{!"_BfsNode", !16, i64 0, !10, i64 32, !10, i64 36, !10, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !6, i64 56, !10, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!16 = !{!"_State", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!15, !10, i64 32}
!18 = !{!15, !6, i64 72}
!19 = !{!15, !10, i64 40}
!20 = !{!15, !6, i64 56}
!21 = !{!22, !7, i64 8}
!22 = !{!"_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, !13, i64 40}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!15, !10, i64 64}
!26 = distinct !{!26, !24}
!27 = !{!15, !6, i64 80}
!28 = distinct !{!28, !24}
!29 = !{!15, !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
@gnum_H = external local_unnamed_addr global i32, align 4
@gop_conn = external local_unnamed_addr global ptr, align 8
@gH = 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
@lbfs_space_head = external dso_local local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [44 x i8], align 1

declare i32 @get_1P_and_H(ptr noundef) local_unnamed_addr #0

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

declare i32 @get_1P_and_A(ptr noundef) local_unnamed_addr #0

declare void @print_op_name(i32 noundef) local_unnamed_addr #0

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

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

declare ptr @new_BfsNode() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @add_to_bfs_space(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = tail call zeroext i8 @superior_bfs_state_hashed(ptr noundef %0)
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %5, label %94

5:                                                ; preds = %3
  %6 = load i32, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 776), align 4
  %or.cond = icmp ult i32 %6, 2
  br i1 %or.cond, label %7, label %9

7:                                                ; preds = %5
  %8 = tail call i32 @get_1P_and_A(ptr noundef %0) #5
  %.pr = load i32, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 776), align 4
  br label %9

9:                                                ; preds = %5, %7
  %10 = phi i32 [ %6, %5 ], [ %.pr, %7 ]
  %.052 = phi i32 [ undef, %5 ], [ %8, %7 ]
  %11 = icmp eq i32 %10, 2
  br i1 %11, label %12, label %14

12:                                               ; preds = %9
  %13 = tail call i32 @get_1P_and_H(ptr noundef %0) #5
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 776), align 4
  br label %14

14:                                               ; preds = %12, %9
  %15 = phi i32 [ %.pre, %12 ], [ %10, %9 ]
  %.153 = phi i32 [ %13, %12 ], [ %.052, %9 ]
  %or.cond3 = icmp ugt i32 %15, 2
  br i1 %or.cond3, label %16, label %18

16:                                               ; preds = %14
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  tail call void @exit(i32 noundef 1) #6
  unreachable

18:                                               ; preds = %14
  %19 = icmp eq i32 %.153, -1
  br i1 %19, label %94, label %20

20:                                               ; preds = %18
  %.not61 = icmp eq ptr %2, null
  br i1 %.not61, label %25, label %21

21:                                               ; preds = %20
  %22 = getelementptr inbounds i8, ptr %2, i64 36
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  br label %25

25:                                               ; preds = %20, %21
  %.054 = phi i32 [ %24, %21 ], [ 0, %20 ]
  %26 = tail call ptr @new_BfsNode() #5
  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 !13
  %28 = getelementptr inbounds i8, ptr %26, i64 72
  store ptr %2, ptr %28, align 8, !tbaa !14
  %29 = getelementptr inbounds i8, ptr %26, i64 40
  store i32 %.153, ptr %29, align 8, !tbaa !15
  %30 = getelementptr inbounds i8, ptr %26, i64 36
  store i32 %.054, ptr %30, align 4, !tbaa !5
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @gcmd_line, i64 776), align 4
  %or.cond5 = icmp ult i32 %31, 2
  br i1 %or.cond5, label %32, label %54

32:                                               ; preds = %25
  %33 = load i32, ptr @gnum_A, align 4, !tbaa !16
  %34 = sext i32 %33 to i64
  %35 = tail call noalias ptr @calloc(i64 noundef %34, i64 noundef 4) #7
  %36 = getelementptr inbounds i8, ptr %26, i64 56
  store ptr %35, ptr %36, align 8, !tbaa !17
  %37 = icmp sgt i32 %33, 0
  br i1 %37, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %32
  %38 = load ptr, ptr @gop_conn, align 8, !tbaa !18
  %39 = load ptr, ptr @gA, align 8, !tbaa !18
  %wide.trip.count = zext nneg i32 %33 to i64
  br label %40

40:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %41 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv
  %42 = load i32, ptr %41, align 4, !tbaa !16
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds %struct._OpConn, ptr %38, i64 %43, i32 1
  %45 = load i8, ptr %44, align 8, !tbaa !19
  %.not66 = icmp eq i8 %45, 0
  br i1 %.not66, label %51, label %46

46:                                               ; preds = %40
  %47 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %48 = load ptr, ptr @gA, align 8, !tbaa !18
  %49 = getelementptr inbounds i32, ptr %48, i64 %indvars.iv
  %50 = load i32, ptr %49, align 4, !tbaa !16
  tail call void @print_op_name(i32 noundef %50) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

51:                                               ; preds = %40
  %52 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv
  store i32 %42, ptr %52, align 4, !tbaa !16
  %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 %40, !llvm.loop !21

._crit_edge:                                      ; preds = %51, %32
  %53 = getelementptr inbounds i8, ptr %26, i64 64
  store i32 %33, ptr %53, align 8, !tbaa !23
  br label %54

54:                                               ; preds = %25, %._crit_edge
  %55 = icmp eq i32 %31, 2
  br i1 %55, label %56, label %78

56:                                               ; preds = %54
  %57 = load i32, ptr @gnum_H, align 4, !tbaa !16
  %58 = sext i32 %57 to i64
  %59 = tail call noalias ptr @calloc(i64 noundef %58, i64 noundef 4) #7
  %60 = getelementptr inbounds i8, ptr %26, i64 56
  store ptr %59, ptr %60, align 8, !tbaa !17
  %61 = icmp sgt i32 %57, 0
  br i1 %61, label %.lr.ph77, label %._crit_edge78

.lr.ph77:                                         ; preds = %56
  %62 = load ptr, ptr @gop_conn, align 8, !tbaa !18
  %63 = load ptr, ptr @gH, align 8, !tbaa !18
  %wide.trip.count89 = zext nneg i32 %57 to i64
  br label %64

64:                                               ; preds = %.lr.ph77, %75
  %indvars.iv86 = phi i64 [ 0, %.lr.ph77 ], [ %indvars.iv.next87, %75 ]
  %65 = getelementptr inbounds i32, ptr %63, i64 %indvars.iv86
  %66 = load i32, ptr %65, align 4, !tbaa !16
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct._OpConn, ptr %62, i64 %67, i32 1
  %69 = load i8, ptr %68, align 8, !tbaa !19
  %.not65 = icmp eq i8 %69, 0
  br i1 %.not65, label %75, label %70

70:                                               ; preds = %64
  %71 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %72 = load ptr, ptr @gH, align 8, !tbaa !18
  %73 = getelementptr inbounds i32, ptr %72, i64 %indvars.iv86
  %74 = load i32, ptr %73, align 4, !tbaa !16
  tail call void @print_op_name(i32 noundef %74) #5
  tail call void @exit(i32 noundef 1) #6
  unreachable

75:                                               ; preds = %64
  %76 = getelementptr inbounds i32, ptr %59, i64 %indvars.iv86
  store i32 %66, ptr %76, align 4, !tbaa !16
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next87, %wide.trip.count89
  br i1 %exitcond90.not, label %._crit_edge78, label %64, !llvm.loop !24

._crit_edge78:                                    ; preds = %75, %56
  %77 = getelementptr inbounds i8, ptr %26, i64 64
  store i32 %57, ptr %77, align 8, !tbaa !23
  br label %78

78:                                               ; preds = %._crit_edge78, %54
  %79 = load ptr, ptr @lbfs_space_head, align 8, !tbaa !18
  br label %80

80:                                               ; preds = %83, %78
  %.055 = phi ptr [ %79, %78 ], [ %82, %83 ]
  %81 = getelementptr inbounds i8, ptr %.055, i64 80
  %82 = load ptr, ptr %81, align 8, !tbaa !25
  %.not62 = icmp eq ptr %82, null
  br i1 %.not62, label %86, label %83

83:                                               ; preds = %80
  %84 = getelementptr inbounds i8, ptr %82, i64 40
  %85 = load i32, ptr %84, align 8, !tbaa !15
  %.not63 = icmp slt i32 %85, %.153
  br i1 %.not63, label %80, label %86, !llvm.loop !26

86:                                               ; preds = %83, %80
  %87 = getelementptr inbounds i8, ptr %.055, i64 80
  %88 = getelementptr inbounds i8, ptr %26, i64 80
  store ptr %82, ptr %88, align 8, !tbaa !25
  %89 = getelementptr inbounds i8, ptr %26, i64 88
  store ptr %.055, ptr %89, align 8, !tbaa !27
  store ptr %26, ptr %87, align 8, !tbaa !25
  %90 = load ptr, ptr %88, align 8, !tbaa !25
  %.not64 = icmp eq ptr %90, null
  br i1 %.not64, label %93, label %91

91:                                               ; preds = %86
  %92 = getelementptr inbounds i8, ptr %90, i64 88
  store ptr %26, ptr %92, align 8, !tbaa !27
  br label %93

93:                                               ; preds = %91, %86
  tail call void @hash_bfs_node(ptr noundef nonnull %26)
  br label %94

94:                                               ; preds = %18, %3, %93
  ret void
}

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

; 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 #4

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

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

!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, !11, i64 36}
!6 = !{!"_BfsNode", !7, i64 0, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !8, i64 56, !11, i64 64, !8, i64 72, !8, i64 80, !8, i64 88}
!7 = !{!"_State", !8, i64 0, !11, i64 8, !8, i64 16, !8, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"float", !9, i64 0}
!13 = !{!6, !11, i64 32}
!14 = !{!6, !8, i64 72}
!15 = !{!6, !11, i64 40}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !8, i64 56}
!18 = !{!8, !8, i64 0}
!19 = !{!20, !9, i64 8}
!20 = !{!"_OpConn", !8, i64 0, !9, i64 8, !8, i64 16, !11, i64 24, !9, i64 28, !9, i64 29, !11, i64 32, !9, i64 36, !12, i64 40}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !11, i64 64}
!24 = distinct !{!24, !22}
!25 = !{!6, !8, i64 80}
!26 = distinct !{!26, !22}
!27 = !{!6, !8, i64 88}


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