; LLVM IR from justinxu9905/bustub-2022-fall :: third_party/fmt/test/fuzzing (chrono-duration)

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

; Function Attrs: mustprogress uwtable
define dso_local i32 @LLVMFuzzerTestOneInput(ptr noundef %0, i64 noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %8 = load i64, ptr %5, align 8, !tbaa !9
  %9 = icmp ule i64 %8, 4
  br i1 %9, label %10, label %11

10:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  br label %85

11:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #2
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 0
  %14 = load i8, ptr %13, align 1, !tbaa !11
  store i8 %14, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 1
  %17 = load i8, ptr %16, align 1, !tbaa !11
  store i8 %17, ptr %7, align 1, !tbaa !11
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 2
  store ptr %19, ptr %4, align 8, !tbaa !5
  %20 = load i64, ptr %5, align 8, !tbaa !9
  %21 = sub i64 %20, 2
  store i64 %21, ptr %5, align 8, !tbaa !9
  %22 = load i8, ptr %6, align 1, !tbaa !11
  %23 = zext i8 %22 to i32
  switch i32 %23, label %84 [
    i32 1, label %24
    i32 2, label %29
    i32 3, label %34
    i32 4, label %39
    i32 5, label %44
    i32 6, label %49
    i32 7, label %54
    i32 8, label %59
    i32 9, label %64
    i32 10, label %69
    i32 11, label %74
    i32 12, label %79
  ]

24:                                               ; preds = %11
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = load i64, ptr %5, align 8, !tbaa !9
  %27 = load i8, ptr %7, align 1, !tbaa !11
  %28 = zext i8 %27 to i32
  call void @_Z12invoke_outerIcEvPKhmi(ptr noundef %25, i64 noundef %26, i32 noundef %28)
  br label %84

29:                                               ; preds = %11
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = load i64, ptr %5, align 8, !tbaa !9
  %32 = load i8, ptr %7, align 1, !tbaa !11
  %33 = zext i8 %32 to i32
  call void @_Z12invoke_outerIaEvPKhmi(ptr noundef %30, i64 noundef %31, i32 noundef %33)
  br label %84

34:                                               ; preds = %11
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = load i64, ptr %5, align 8, !tbaa !9
  %37 = load i8, ptr %7, align 1, !tbaa !11
  %38 = zext i8 %37 to i32
  call void @_Z12invoke_outerIhEvPKhmi(ptr noundef %35, i64 noundef %36, i32 noundef %38)
  br label %84

39:                                               ; preds = %11
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = load i64, ptr %5, align 8, !tbaa !9
  %42 = load i8, ptr %7, align 1, !tbaa !11
  %43 = zext i8 %42 to i32
  call void @_Z12invoke_outerIsEvPKhmi(ptr noundef %40, i64 noundef %41, i32 noundef %43)
  br label %84

44:                                               ; preds = %11
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load i64, ptr %5, align 8, !tbaa !9
  %47 = load i8, ptr %7, align 1, !tbaa !11
  %48 = zext i8 %47 to i32
  call void @_Z12invoke_outerItEvPKhmi(ptr noundef %45, i64 noundef %46, i32 noundef %48)
  br label %84

49:                                               ; preds = %11
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = load i64, ptr %5, align 8, !tbaa !9
  %52 = load i8, ptr %7, align 1, !tbaa !11
  %53 = zext i8 %52 to i32
  call void @_Z12invoke_outerIiEvPKhmi(ptr noundef %50, i64 noundef %51, i32 noundef %53)
  br label %84

54:                                               ; preds = %11
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i64, ptr %5, align 8, !tbaa !9
  %57 = load i8, ptr %7, align 1, !tbaa !11
  %58 = zext i8 %57 to i32
  call void @_Z12invoke_outerIjEvPKhmi(ptr noundef %55, i64 noundef %56, i32 noundef %58)
  br label %84

59:                                               ; preds = %11
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load i64, ptr %5, align 8, !tbaa !9
  %62 = load i8, ptr %7, align 1, !tbaa !11
  %63 = zext i8 %62 to i32
  call void @_Z12invoke_outerIlEvPKhmi(ptr noundef %60, i64 noundef %61, i32 noundef %63)
  br label %84

64:                                               ; preds = %11
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = load i64, ptr %5, align 8, !tbaa !9
  %67 = load i8, ptr %7, align 1, !tbaa !11
  %68 = zext i8 %67 to i32
  call void @_Z12invoke_outerImEvPKhmi(ptr noundef %65, i64 noundef %66, i32 noundef %68)
  br label %84

69:                                               ; preds = %11
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load i64, ptr %5, align 8, !tbaa !9
  %72 = load i8, ptr %7, align 1, !tbaa !11
  %73 = zext i8 %72 to i32
  call void @_Z12invoke_outerIfEvPKhmi(ptr noundef %70, i64 noundef %71, i32 noundef %73)
  br label %84

74:                                               ; preds = %11
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = load i64, ptr %5, align 8, !tbaa !9
  %77 = load i8, ptr %7, align 1, !tbaa !11
  %78 = zext i8 %77 to i32
  call void @_Z12invoke_outerIdEvPKhmi(ptr noundef %75, i64 noundef %76, i32 noundef %78)
  br label %84

79:                                               ; preds = %11
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = load i64, ptr %5, align 8, !tbaa !9
  %82 = load i8, ptr %7, align 1, !tbaa !11
  %83 = zext i8 %82 to i32
  call void @_Z12invoke_outerIeEvPKhmi(ptr noundef %80, i64 noundef %81, i32 noundef %83)
  br label %84

84:                                               ; preds = %79, %74, %69, %64, %59, %54, %49, %44, %39, %34, %29, %24, %11
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #2
  br label %85

85:                                               ; preds = %84, %10
  %86 = load i32, ptr %3, align 4
  ret i32 %86
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIcEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIaEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIhEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIsEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerItEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIiEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIjEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIlEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerImEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIfEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIdEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIeEvPKhmi(ptr noundef, i64 noundef, i32 noundef) #0

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!7, !7, i64 0}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @LLVMFuzzerTestOneInput(ptr noundef %0, i64 noundef %1) local_unnamed_addr #0 {
  %3 = icmp ult i64 %1, 5
  br i1 %3, label %34, label %4

4:                                                ; preds = %2
  %5 = load i8, ptr %0, align 1, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 1
  %7 = load i8, ptr %6, align 1, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 2
  %9 = add i64 %1, -2
  switch i8 %5, label %34 [
    i8 1, label %10
    i8 2, label %12
    i8 3, label %14
    i8 4, label %16
    i8 5, label %18
    i8 6, label %20
    i8 7, label %22
    i8 8, label %24
    i8 9, label %26
    i8 10, label %28
    i8 11, label %30
    i8 12, label %32
  ]

10:                                               ; preds = %4
  %11 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIcEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %11)
  br label %34

12:                                               ; preds = %4
  %13 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIaEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %13)
  br label %34

14:                                               ; preds = %4
  %15 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIhEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %15)
  br label %34

16:                                               ; preds = %4
  %17 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIsEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %17)
  br label %34

18:                                               ; preds = %4
  %19 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerItEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %19)
  br label %34

20:                                               ; preds = %4
  %21 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIiEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %21)
  br label %34

22:                                               ; preds = %4
  %23 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIjEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %23)
  br label %34

24:                                               ; preds = %4
  %25 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIlEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %25)
  br label %34

26:                                               ; preds = %4
  %27 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerImEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %27)
  br label %34

28:                                               ; preds = %4
  %29 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIfEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %29)
  br label %34

30:                                               ; preds = %4
  %31 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIdEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %31)
  br label %34

32:                                               ; preds = %4
  %33 = zext i8 %7 to i32
  tail call void @_Z12invoke_outerIeEvPKhmi(ptr noundef nonnull %8, i64 noundef %9, i32 noundef %33)
  br label %34

34:                                               ; preds = %4, %10, %12, %14, %16, %18, %20, %22, %24, %26, %28, %30, %32, %2
  ret i32 0
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIcEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIaEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIhEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIsEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerItEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIiEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIjEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIlEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerImEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIfEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIdEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12invoke_outerIeEvPKhmi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #0

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

!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++ TBAA"}


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