; LLVM IR from OAID/AutoKernel :: AutoSearch/src/adams2019 (FunctionDAG)

; 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"

%"class.Halide::Internal::aslog" = type { i8 }
%"struct.Halide::Internal::Autoscheduler::OptionalRational" = type { i8, i64, i64 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian4dumpEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.Halide::Internal::aslog", align 1
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.Halide::Internal::aslog", align 1
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.Halide::Internal::Autoscheduler::OptionalRational", align 8
  %13 = alloca %"class.Halide::Internal::aslog", align 1
  %14 = alloca %"class.Halide::Internal::aslog", align 1
  %15 = alloca %"class.Halide::Internal::aslog", align 1
  %16 = alloca %"class.Halide::Internal::aslog", align 1
  %17 = alloca %"class.Halide::Internal::aslog", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %18 = load ptr, ptr %3, align 8
  %19 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian5countEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %20 = icmp sgt i64 %19, 1
  br i1 %20, label %21, label %26

21:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %5, i32 noundef 0)
  %22 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRPKcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %23 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian5countEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  store i64 %23, ptr %6, align 8, !tbaa !9
  %24 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %22, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %25 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA4_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %24, ptr noundef nonnull align 1 dereferenceable(4) @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  br label %26

26:                                               ; preds = %21, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 0, ptr %7, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %78, %26
  %28 = load i64, ptr %7, align 8, !tbaa !9
  %29 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian21producer_storage_dimsEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %30 = icmp ult i64 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %81

32:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %9, i32 noundef 0)
  %33 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRPKcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %34 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA4_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %33, ptr noundef nonnull align 1 dereferenceable(4) @.str.2)
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %73, %32
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian18consumer_loop_dimsEv(ptr noundef nonnull align 8 dereferenceable(32) %18)
  %38 = icmp ult i64 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %76

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #3
  %41 = load i64, ptr %7, align 8, !tbaa !9
  %42 = trunc i64 %41 to i32
  %43 = load i64, ptr %10, align 8, !tbaa !9
  %44 = trunc i64 %43 to i32
  call void @_ZNK6Halide8Internal13Autoscheduler12LoadJacobianclEii(ptr dead_on_unwind writable sret(%"struct.Halide::Internal::Autoscheduler::OptionalRational") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %18, i32 noundef %42, i32 noundef %44)
  store ptr %12, ptr %11, align 8, !tbaa !5
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.Halide::Internal::Autoscheduler::OptionalRational", ptr %45, i32 0, i32 0
  %47 = load i8, ptr %46, align 8, !tbaa !11, !range !14, !noundef !15
  %48 = trunc i8 %47 to i1
  br i1 %48, label %51, label %49

49:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %13, i32 noundef 0)
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA5_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %13, ptr noundef nonnull align 1 dereferenceable(5) @.str.3)
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  br label %72

51:                                               ; preds = %40
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.Halide::Internal::Autoscheduler::OptionalRational", ptr %52, i32 0, i32 2
  %54 = load i64, ptr %53, align 8, !tbaa !16
  %55 = icmp eq i64 %54, 1
  br i1 %55, label %56, label %62

56:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %14, i32 noundef 0)
  %57 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %14, ptr noundef nonnull align 1 dereferenceable(2) @.str.4)
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.Halide::Internal::Autoscheduler::OptionalRational", ptr %58, i32 0, i32 1
  %60 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %57, ptr noundef nonnull align 8 dereferenceable(8) %59)
  %61 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA3_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %60, ptr noundef nonnull align 1 dereferenceable(3) @.str.5)
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  br label %71

62:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %15, i32 noundef 0)
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.Halide::Internal::Autoscheduler::OptionalRational", ptr %63, i32 0, i32 1
  %65 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef nonnull align 8 dereferenceable(8) %64)
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %65, ptr noundef nonnull align 1 dereferenceable(2) @.str.6)
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.Halide::Internal::Autoscheduler::OptionalRational", ptr %67, i32 0, i32 2
  %69 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %66, ptr noundef nonnull align 8 dereferenceable(8) %68)
  %70 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %69, ptr noundef nonnull align 1 dereferenceable(2) @.str.4)
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  br label %71

71:                                               ; preds = %62, %56
  br label %72

72:                                               ; preds = %71, %49
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %73

73:                                               ; preds = %72
  %74 = load i64, ptr %10, align 8, !tbaa !9
  %75 = add i64 %74, 1
  store i64 %75, ptr %10, align 8, !tbaa !9
  br label %35, !llvm.loop !17

76:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %16, i32 noundef 0)
  %77 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA3_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 1 dereferenceable(3) @.str.7)
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #3
  br label %78

78:                                               ; preds = %76
  %79 = load i64, ptr %7, align 8, !tbaa !9
  %80 = add i64 %79, 1
  store i64 %80, ptr %7, align 8, !tbaa !9
  br label %27, !llvm.loop !19

81:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %17, i32 noundef 0)
  %82 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %17, ptr noundef nonnull align 1 dereferenceable(2) @.str.8)
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #3
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian5countEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRPKcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA4_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(4)) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian21producer_storage_dimsEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian18consumer_loop_dimsEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6Halide8Internal13Autoscheduler12LoadJacobianclEii(ptr dead_on_unwind noalias writable sret(%"struct.Halide::Internal::Autoscheduler::OptionalRational") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA5_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(5)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(2)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA3_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(3)) #0 align 2

attributes #0 = { mustprogress 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN6Halide8Internal13Autoscheduler16OptionalRationalE", !13, i64 0, !10, i64 8, !10, i64 16}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!12, !10, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}


; 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"

%"class.Halide::Internal::aslog" = type { i8 }
%"struct.Halide::Internal::Autoscheduler::OptionalRational" = type { i8, i64, i64 }

@.str = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian4dumpEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %1) local_unnamed_addr #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca %"class.Halide::Internal::aslog", align 1
  %5 = alloca i64, align 8
  %6 = alloca %"class.Halide::Internal::aslog", align 1
  %7 = alloca %"struct.Halide::Internal::Autoscheduler::OptionalRational", align 8
  %8 = alloca %"class.Halide::Internal::aslog", align 1
  %9 = alloca %"class.Halide::Internal::aslog", align 1
  %10 = alloca %"class.Halide::Internal::aslog", align 1
  %11 = alloca %"class.Halide::Internal::aslog", align 1
  %12 = alloca %"class.Halide::Internal::aslog", align 1
  store ptr %1, ptr %3, align 8, !tbaa !5
  %13 = tail call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian5countEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %14 = icmp sgt i64 %13, 1
  br i1 %14, label %15, label %20

15:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %4, i32 noundef 0)
  %16 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRPKcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %17 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian5countEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  store i64 %17, ptr %5, align 8, !tbaa !9
  %18 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %19 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA4_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef nonnull align 1 dereferenceable(4) @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  br label %20

20:                                               ; preds = %15, %2
  %21 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian21producer_storage_dimsEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %.not = icmp eq i64 %21, 0
  br i1 %.not, label %._crit_edge16, label %.lr.ph15

.lr.ph15:                                         ; preds = %20
  %22 = getelementptr inbounds i8, ptr %7, i64 16
  %23 = getelementptr inbounds i8, ptr %7, i64 8
  br label %25

._crit_edge16:                                    ; preds = %._crit_edge, %20
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %12, i32 noundef 0)
  %24 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %12, ptr noundef nonnull align 1 dereferenceable(2) @.str.8)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #3
  ret void

25:                                               ; preds = %.lr.ph15, %._crit_edge
  %.013 = phi i64 [ 0, %.lr.ph15 ], [ %31, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %6, i32 noundef 0)
  %26 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRPKcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %27 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA4_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 1 dereferenceable(4) @.str.2)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  %28 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian18consumer_loop_dimsEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %.not17 = icmp eq i64 %28, 0
  br i1 %.not17, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %25
  %29 = trunc i64 %.013 to i32
  br label %34

._crit_edge:                                      ; preds = %52, %25
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %11, i32 noundef 0)
  %30 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA3_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(3) @.str.7)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #3
  %31 = add nuw i64 %.013, 1
  %32 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian21producer_storage_dimsEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %33 = icmp ult i64 %31, %32
  br i1 %33, label %25, label %._crit_edge16, !llvm.loop !11

34:                                               ; preds = %.lr.ph, %52
  %.01112 = phi i64 [ 0, %.lr.ph ], [ %53, %52 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #3
  %35 = trunc i64 %.01112 to i32
  call void @_ZNK6Halide8Internal13Autoscheduler12LoadJacobianclEii(ptr dead_on_unwind nonnull writable sret(%"struct.Halide::Internal::Autoscheduler::OptionalRational") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %29, i32 noundef %35)
  %36 = load i8, ptr %7, align 8, !tbaa !13, !range !16, !noundef !17
  %37 = trunc nuw i8 %36 to i1
  br i1 %37, label %40, label %38

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %8, i32 noundef 0)
  %39 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA5_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(5) @.str.3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #3
  br label %52

40:                                               ; preds = %34
  %41 = load i64, ptr %22, align 8, !tbaa !18
  %42 = icmp eq i64 %41, 1
  br i1 %42, label %43, label %47

43:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %9, i32 noundef 0)
  %44 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %9, ptr noundef nonnull align 1 dereferenceable(2) @.str.4)
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %44, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %46 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA3_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %45, ptr noundef nonnull align 1 dereferenceable(3) @.str.5)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #3
  br label %52

47:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #3
  call void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %10, i32 noundef 0)
  %48 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %49 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %48, ptr noundef nonnull align 1 dereferenceable(2) @.str.6)
  %50 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %49, ptr noundef nonnull align 8 dereferenceable(8) %22)
  %51 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1) %50, ptr noundef nonnull align 1 dereferenceable(2) @.str.4)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #3
  br label %52

52:                                               ; preds = %43, %47, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #3
  %53 = add nuw i64 %.01112, 1
  %54 = call noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian18consumer_loop_dimsEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %34, label %._crit_edge, !llvm.loop !19
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian5countEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Halide8Internal5aslogC2Ei(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRPKcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA4_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian21producer_storage_dimsEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Halide8Internal13Autoscheduler12LoadJacobian18consumer_loop_dimsEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6Halide8Internal13Autoscheduler12LoadJacobianclEii(ptr dead_on_unwind noalias writable sret(%"struct.Halide::Internal::Autoscheduler::OptionalRational") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA5_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(5)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA2_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(2)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRKlEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZN6Halide8Internal5asloglsIRA3_KcEERS1_OT_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(3)) local_unnamed_addr #0 align 2

attributes #0 = { mustprogress 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 #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN6Halide8Internal13Autoscheduler16OptionalRationalE", !15, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!"bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!14, !10, i64 16}
!19 = distinct !{!19, !12}


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