; LLVM IR from generalized-intelligence/GAAS :: algorithms/src/SystemManagement/json_request_response_lib/src/third_party (LLVMFuzzerTestOneInput)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local i32 @LLVMFuzzerTestOneInput(ptr noundef %0, i64 noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !11
  %6 = load i64, ptr %4, align 8, !tbaa !9
  %7 = icmp ugt i64 %6, 0
  br i1 %7, label %8, label %17

8:                                                ; preds = %2
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 0
  %11 = load i8, ptr %10, align 1, !tbaa !13
  %12 = zext i8 %11 to i32
  %13 = icmp eq i32 %12, 70
  br i1 %13, label %14, label %17

14:                                               ; preds = %8
  %15 = load i32, ptr %5, align 4, !tbaa !11
  %16 = or i32 %15, 1
  store i32 %16, ptr %5, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %14, %8, %2
  %18 = load i64, ptr %4, align 8, !tbaa !9
  %19 = icmp ugt i64 %18, 1
  br i1 %19, label %20, label %29

20:                                               ; preds = %17
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 1
  %23 = load i8, ptr %22, align 1, !tbaa !13
  %24 = zext i8 %23 to i32
  %25 = icmp eq i32 %24, 85
  br i1 %25, label %26, label %29

26:                                               ; preds = %20
  %27 = load i32, ptr %5, align 4, !tbaa !11
  %28 = or i32 %27, 2
  store i32 %28, ptr %5, align 4, !tbaa !11
  br label %29

29:                                               ; preds = %26, %20, %17
  %30 = load i64, ptr %4, align 8, !tbaa !9
  %31 = icmp ugt i64 %30, 2
  br i1 %31, label %32, label %41

32:                                               ; preds = %29
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = zext i8 %35 to i32
  %37 = icmp eq i32 %36, 90
  br i1 %37, label %38, label %41

38:                                               ; preds = %32
  %39 = load i32, ptr %5, align 4, !tbaa !11
  %40 = or i32 %39, 4
  store i32 %40, ptr %5, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %38, %32, %29
  %42 = load i64, ptr %4, align 8, !tbaa !9
  %43 = icmp ugt i64 %42, 3
  br i1 %43, label %44, label %53

44:                                               ; preds = %41
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 3
  %47 = load i8, ptr %46, align 1, !tbaa !13
  %48 = zext i8 %47 to i32
  %49 = icmp eq i32 %48, 90
  br i1 %49, label %50, label %53

50:                                               ; preds = %44
  %51 = load i32, ptr %5, align 4, !tbaa !11
  %52 = or i32 %51, 8
  store i32 %52, ptr %5, align 4, !tbaa !11
  br label %53

53:                                               ; preds = %50, %44, %41
  %54 = load i64, ptr %4, align 8, !tbaa !9
  %55 = icmp ugt i64 %54, 4
  br i1 %55, label %56, label %65

56:                                               ; preds = %53
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %57, i64 4
  %59 = load i8, ptr %58, align 1, !tbaa !13
  %60 = zext i8 %59 to i32
  %61 = icmp eq i32 %60, 69
  br i1 %61, label %62, label %65

62:                                               ; preds = %56
  %63 = load i32, ptr %5, align 4, !tbaa !11
  %64 = or i32 %63, 16
  store i32 %64, ptr %5, align 4, !tbaa !11
  br label %65

65:                                               ; preds = %62, %56, %53
  %66 = load i64, ptr %4, align 8, !tbaa !9
  %67 = icmp ugt i64 %66, 5
  br i1 %67, label %68, label %77

68:                                               ; preds = %65
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 5
  %71 = load i8, ptr %70, align 1, !tbaa !13
  %72 = zext i8 %71 to i32
  %73 = icmp eq i32 %72, 82
  br i1 %73, label %74, label %77

74:                                               ; preds = %68
  %75 = load i32, ptr %5, align 4, !tbaa !11
  %76 = or i32 %75, 32
  store i32 %76, ptr %5, align 4, !tbaa !11
  br label %77

77:                                               ; preds = %74, %68, %65
  %78 = load i32, ptr %5, align 4, !tbaa !11
  %79 = icmp eq i32 %78, 63
  br i1 %79, label %80, label %82

80:                                               ; preds = %77
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str)
  call void @exit(i32 noundef 1) #5
  unreachable

82:                                               ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

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

; 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 = { inlinehint 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 #3 = { 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 #4 = { nounwind }
attributes #5 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!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"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @LLVMFuzzerTestOneInput(ptr nocapture noundef readonly %0, i64 noundef %1) local_unnamed_addr #0 {
  %switch = icmp ult i64 %1, 6
  br i1 %switch, label %.thread36, label %3

3:                                                ; preds = %2
  %4 = getelementptr inbounds i8, ptr %0, i64 1
  %5 = load <4 x i8>, ptr %4, align 1, !tbaa !5
  %6 = icmp eq <4 x i8> %5, <i8 85, i8 90, i8 90, i8 69>
  %7 = load i8, ptr %0, align 1, !tbaa !5
  %8 = icmp eq i8 %7, 70
  %spec.select = zext i1 %8 to i32
  %9 = or disjoint i32 %spec.select, 2
  %10 = extractelement <4 x i1> %6, i64 0
  %spec.select18 = select i1 %10, i32 %9, i32 %spec.select
  %11 = or disjoint i32 %spec.select18, 4
  %12 = extractelement <4 x i1> %6, i64 1
  %spec.select19 = select i1 %12, i32 %11, i32 %spec.select18
  %13 = or disjoint i32 %spec.select19, 8
  %14 = extractelement <4 x i1> %6, i64 2
  %spec.select20 = select i1 %14, i32 %13, i32 %spec.select19
  %15 = or i32 %spec.select20, 16
  %16 = extractelement <4 x i1> %6, i64 3
  %spec.select21 = select i1 %16, i32 %15, i32 %spec.select20
  %17 = getelementptr inbounds i8, ptr %0, i64 5
  %18 = load i8, ptr %17, align 1, !tbaa !5
  %19 = icmp eq i8 %18, 82
  %20 = and i32 %spec.select21, -33
  %21 = icmp eq i32 %20, 31
  %or.cond = select i1 %19, i1 %21, i1 false
  br i1 %or.cond, label %22, label %.thread36

22:                                               ; preds = %3
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str)
  tail call void @exit(i32 noundef 1) #3
  unreachable

.thread36:                                        ; preds = %2, %3
  ret i32 0
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #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 = { inlinehint 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 #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 = { 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++ TBAA"}


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