; LLVM IR from AngoraFuzzer/Angora :: llvm_mode/dfsan_rt/sanitizer_common (sanitizer_procmaps_common)

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

@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11__sanitizer9IsDecimalEc(i8 noundef signext) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN11__sanitizer12ParseDecimalEPPKc(ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11__sanitizer5IsHexEc(i8 noundef signext) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN11__sanitizer8ParseHexEPPKc(ptr noundef) #0

declare void @_ZN11__sanitizer10UnmapOrDieEPvm(ptr noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer16GetMemoryProfileEPFvmmbPmmES0_m(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !9
  %15 = call noundef zeroext i1 @_ZN11__sanitizer16ReadFileToBufferEPKcPPcPmS4_mPi(ptr noundef @.str.3, ptr noundef %7, ptr noundef %8, ptr noundef %9, i64 noundef 67108864, ptr noundef null)
  br i1 %15, label %17, label %16

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

17:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  store i8 0, ptr %12, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %18, ptr %13, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %86, %17
  %20 = load ptr, ptr %13, align 8, !tbaa !5
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load i64, ptr %9, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %21, i64 %22
  %24 = icmp ult ptr %20, %23
  br i1 %24, label %25, label %87

25:                                               ; preds = %19
  %26 = load ptr, ptr %13, align 8, !tbaa !5
  %27 = getelementptr inbounds i8, ptr %26, i64 0
  %28 = load i8, ptr %27, align 1, !tbaa !13
  %29 = call noundef zeroext i1 @_ZN11__sanitizer5IsHexEc(i8 noundef signext %28)
  br i1 %29, label %30, label %54

30:                                               ; preds = %25
  %31 = call noundef i64 @_ZN11__sanitizer8ParseHexEPPKc(ptr noundef %13)
  store i64 %31, ptr %11, align 8, !tbaa !9
  br label %32

32:                                               ; preds = %45, %30
  %33 = load ptr, ptr %13, align 8, !tbaa !5
  %34 = load i8, ptr %33, align 1, !tbaa !13
  %35 = sext i8 %34 to i32
  %36 = icmp ne i32 %35, 47
  br i1 %36, label %37, label %42

37:                                               ; preds = %32
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = load i8, ptr %38, align 1, !tbaa !13
  %40 = sext i8 %39 to i32
  %41 = icmp sgt i32 %40, 10
  br label %42

42:                                               ; preds = %37, %32
  %43 = phi i1 [ false, %32 ], [ %41, %37 ]
  br i1 %43, label %44, label %48

44:                                               ; preds = %42
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i32 1
  store ptr %47, ptr %13, align 8, !tbaa !5
  br label %32, !llvm.loop !14

48:                                               ; preds = %42
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = load i8, ptr %49, align 1, !tbaa !13
  %51 = sext i8 %50 to i32
  %52 = icmp eq i32 %51, 47
  %53 = zext i1 %52 to i8
  store i8 %53, ptr %12, align 1, !tbaa !11
  br label %78

54:                                               ; preds = %25
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  %56 = call noundef i32 @_ZN11__sanitizer16internal_strncmpEPKcS1_m(ptr noundef %55, ptr noundef @.str.4, i64 noundef 4)
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %77

58:                                               ; preds = %54
  br label %59

59:                                               ; preds = %64, %58
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = load i8, ptr %60, align 1, !tbaa !13
  %62 = call noundef zeroext i1 @_ZN11__sanitizer9IsDecimalEc(i8 noundef signext %61)
  %63 = xor i1 %62, true
  br i1 %63, label %64, label %67

64:                                               ; preds = %59
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i32 1
  store ptr %66, ptr %13, align 8, !tbaa !5
  br label %59, !llvm.loop !16

67:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %68 = call noundef i64 @_ZN11__sanitizer12ParseDecimalEPPKc(ptr noundef %13)
  %69 = mul i64 %68, 1024
  store i64 %69, ptr %14, align 8, !tbaa !9
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = load i64, ptr %11, align 8, !tbaa !9
  %72 = load i64, ptr %14, align 8, !tbaa !9
  %73 = load i8, ptr %12, align 1, !tbaa !11, !range !17, !noundef !18
  %74 = trunc i8 %73 to i1
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load i64, ptr %6, align 8, !tbaa !9
  call void %70(i64 noundef %71, i64 noundef %72, i1 noundef zeroext %74, ptr noundef %75, i64 noundef %76)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %77

77:                                               ; preds = %67, %54
  br label %78

78:                                               ; preds = %77, %48
  br label %79

79:                                               ; preds = %85, %78
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds i8, ptr %80, i32 1
  store ptr %81, ptr %13, align 8, !tbaa !5
  %82 = load i8, ptr %80, align 1, !tbaa !13
  %83 = sext i8 %82 to i32
  %84 = icmp ne i32 %83, 10
  br i1 %84, label %85, label %86

85:                                               ; preds = %79
  br label %79, !llvm.loop !19

86:                                               ; preds = %79
  br label %19, !llvm.loop !20

87:                                               ; preds = %19
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load i64, ptr %8, align 8, !tbaa !9
  call void @_ZN11__sanitizer10UnmapOrDieEPvm(ptr noundef %88, i64 noundef %89)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  store i32 0, ptr %10, align 4
  br label %90

90:                                               ; preds = %87, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  %91 = load i32, ptr %10, align 4
  switch i32 %91, label %93 [
    i32 0, label %92
    i32 1, label %92
  ]

92:                                               ; preds = %90, %90
  ret void

93:                                               ; preds = %90
  unreachable
}

declare noundef zeroext i1 @_ZN11__sanitizer16ReadFileToBufferEPKcPPcPmS4_mPi(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

declare noundef i32 @_ZN11__sanitizer16internal_strncmpEPKcS1_m(ptr noundef, ptr noundef, i64 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 }

!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 = !{!"bool", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


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

@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11__sanitizer9IsDecimalEc(i8 noundef signext) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN11__sanitizer12ParseDecimalEPPKc(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11__sanitizer5IsHexEc(i8 noundef signext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN11__sanitizer8ParseHexEPPKc(ptr noundef) local_unnamed_addr #0

declare void @_ZN11__sanitizer10UnmapOrDieEPvm(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer16GetMemoryProfileEPFvmmbPmmES0_m(ptr nocapture noundef readonly %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  store i64 0, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  store i64 0, ptr %6, align 8, !tbaa !9
  %8 = call noundef zeroext i1 @_ZN11__sanitizer16ReadFileToBufferEPKcPPcPmS4_mPi(ptr noundef nonnull @.str.3, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, i64 noundef 67108864, ptr noundef null)
  br i1 %8, label %9, label %48

9:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %10, ptr %7, align 8, !tbaa !5
  %11 = load i64, ptr %6, align 8, !tbaa !9
  %12 = icmp sgt i64 %11, 0
  br i1 %12, label %.lr.ph19, label %._crit_edge20

.lr.ph19:                                         ; preds = %9, %42
  %13 = phi ptr [ %40, %42 ], [ %10, %9 ]
  %.017 = phi i1 [ %.1, %42 ], [ false, %9 ]
  %.0516 = phi i64 [ %.16, %42 ], [ 0, %9 ]
  %14 = load i8, ptr %13, align 1, !tbaa !11
  %15 = call noundef zeroext i1 @_ZN11__sanitizer5IsHexEc(i8 noundef signext %14)
  br i1 %15, label %16, label %25

16:                                               ; preds = %.lr.ph19
  %17 = call noundef i64 @_ZN11__sanitizer8ParseHexEPPKc(ptr noundef nonnull %7)
  %.promoted = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load i8, ptr %.promoted, align 1, !tbaa !11
  %.not11 = icmp ne i8 %18, 47
  %19 = icmp sgt i8 %18, 10
  %or.cond12 = and i1 %.not11, %19
  br i1 %or.cond12, label %.lr.ph14, label %.critedge

.lr.ph14:                                         ; preds = %16, %.lr.ph14
  %20 = phi ptr [ %21, %.lr.ph14 ], [ %.promoted, %16 ]
  %21 = getelementptr inbounds i8, ptr %20, i64 1
  store ptr %21, ptr %7, align 8, !tbaa !5
  %22 = load i8, ptr %21, align 1, !tbaa !11
  %.not = icmp ne i8 %22, 47
  %23 = icmp sgt i8 %22, 10
  %or.cond = and i1 %.not, %23
  br i1 %or.cond, label %.lr.ph14, label %.critedge, !llvm.loop !12

.critedge:                                        ; preds = %.lr.ph14, %16
  %.promoted1526 = phi ptr [ %.promoted, %16 ], [ %21, %.lr.ph14 ]
  %.lcssa = phi i8 [ %18, %16 ], [ %22, %.lr.ph14 ]
  %24 = icmp eq i8 %.lcssa, 47
  br label %37

25:                                               ; preds = %.lr.ph19
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call noundef i32 @_ZN11__sanitizer16internal_strncmpEPKcS1_m(ptr noundef %26, ptr noundef nonnull @.str.4, i64 noundef 4)
  %28 = icmp eq i32 %27, 0
  %.promoted15.pre24 = load ptr, ptr %7, align 8, !tbaa !5
  br i1 %28, label %.preheader, label %37

.preheader:                                       ; preds = %25
  %29 = load i8, ptr %.promoted15.pre24, align 1, !tbaa !11
  %30 = call noundef zeroext i1 @_ZN11__sanitizer9IsDecimalEc(i8 noundef signext %29)
  br i1 %30, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %31, i64 1
  store ptr %32, ptr %7, align 8, !tbaa !5
  %33 = load i8, ptr %32, align 1, !tbaa !11
  %34 = call noundef zeroext i1 @_ZN11__sanitizer9IsDecimalEc(i8 noundef signext %33)
  br i1 %34, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %35 = call noundef i64 @_ZN11__sanitizer12ParseDecimalEPPKc(ptr noundef nonnull %7)
  %36 = shl i64 %35, 10
  call void %0(i64 noundef %.0516, i64 noundef %36, i1 noundef zeroext %.017, ptr noundef %1, i64 noundef %2)
  %.promoted15.pre = load ptr, ptr %7, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %25, %._crit_edge, %.critedge
  %.promoted15 = phi ptr [ %.promoted1526, %.critedge ], [ %.promoted15.pre, %._crit_edge ], [ %.promoted15.pre24, %25 ]
  %.16 = phi i64 [ %17, %.critedge ], [ %.0516, %._crit_edge ], [ %.0516, %25 ]
  %.1 = phi i1 [ %24, %.critedge ], [ %.017, %._crit_edge ], [ %.017, %25 ]
  br label %38

38:                                               ; preds = %38, %37
  %39 = phi ptr [ %40, %38 ], [ %.promoted15, %37 ]
  %40 = getelementptr inbounds i8, ptr %39, i64 1
  store ptr %40, ptr %7, align 8, !tbaa !5
  %41 = load i8, ptr %39, align 1, !tbaa !11
  %.not9 = icmp eq i8 %41, 10
  br i1 %.not9, label %42, label %38, !llvm.loop !15

42:                                               ; preds = %38
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = load i64, ptr %6, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %43, i64 %44
  %46 = icmp ult ptr %40, %45
  br i1 %46, label %.lr.ph19, label %._crit_edge20, !llvm.loop !16

._crit_edge20:                                    ; preds = %42, %9
  %.lcssa10 = phi ptr [ %10, %9 ], [ %43, %42 ]
  %47 = load i64, ptr %5, align 8, !tbaa !9
  call void @_ZN11__sanitizer10UnmapOrDieEPvm(ptr noundef %.lcssa10, i64 noundef %47)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %48

48:                                               ; preds = %3, %._crit_edge20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret void
}

declare noundef zeroext i1 @_ZN11__sanitizer16ReadFileToBufferEPKcPPcPmS4_mPi(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare noundef i32 @_ZN11__sanitizer16internal_strncmpEPKcS1_m(ptr noundef, ptr noundef, i64 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 }

!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}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass