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

; 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.__sanitizer::CommonFlags" = type { i8, ptr, i8, ptr, i8, i8, i8, i8, i32, ptr, i8, i8, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i64, ptr, i8, i8, i8, i64, i64, i64, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, i8, i8, i8, i8, i8, i8, i32, ptr, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i8, i8, i8, i8, ptr }
%"class.__sanitizer::FlagParser" = type { ptr, i32, ptr, i64 }

@_ZN11__sanitizer21common_flags_dont_useE = external global %"struct.__sanitizer::CommonFlags", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11__sanitizer10FlagParser15skip_whitespaceEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer10FlagParser11parse_flagsEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  br label %4

4:                                                ; preds = %14, %1
  call void @_ZN11__sanitizer10FlagParser15skip_whitespaceEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  %5 = getelementptr inbounds %"class.__sanitizer::FlagParser", ptr %3, i32 0, i32 2
  %6 = load ptr, ptr %5, align 8, !tbaa !9
  %7 = getelementptr inbounds %"class.__sanitizer::FlagParser", ptr %3, i32 0, i32 3
  %8 = load i64, ptr %7, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %6, i64 %8
  %10 = load i8, ptr %9, align 1, !tbaa !14
  %11 = sext i8 %10 to i32
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %14

13:                                               ; preds = %4
  br label %15

14:                                               ; preds = %4
  call void @_ZN11__sanitizer10FlagParser10parse_flagEv(ptr noundef nonnull align 8 dereferenceable(32) %3)
  br label %4, !llvm.loop !15

15:                                               ; preds = %13
  %16 = load i32, ptr getelementptr inbounds (%"struct.__sanitizer::CommonFlags", ptr @_ZN11__sanitizer21common_flags_dont_useE, i32 0, i32 8), align 4, !tbaa !17
  %17 = icmp slt i32 %16, 1
  br i1 %17, label %18, label %19

18:                                               ; preds = %15
  store i32 1, ptr getelementptr inbounds (%"struct.__sanitizer::CommonFlags", ptr @_ZN11__sanitizer21common_flags_dont_useE, i32 0, i32 8), align 4, !tbaa !17
  br label %19

19:                                               ; preds = %18, %15
  ret void
}

attributes #0 = { 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 #1 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"_ZTSN11__sanitizer10FlagParserE", !6, i64 0, !11, i64 8, !6, i64 16, !12, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 24}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !11, i64 36}
!18 = !{!"_ZTSN11__sanitizer11CommonFlagsE", !19, i64 0, !6, i64 8, !19, i64 16, !6, i64 24, !19, i64 32, !19, i64 33, !19, i64 34, !19, i64 35, !11, i64 36, !6, i64 40, !19, i64 48, !19, i64 49, !11, i64 52, !19, i64 56, !19, i64 57, !19, i64 58, !19, i64 59, !19, i64 60, !19, i64 61, !19, i64 62, !19, i64 63, !19, i64 64, !19, i64 65, !19, i64 66, !19, i64 67, !12, i64 72, !6, i64 80, !19, i64 88, !19, i64 89, !19, i64 90, !12, i64 96, !12, i64 104, !12, i64 112, !19, i64 120, !19, i64 121, !19, i64 122, !19, i64 123, !19, i64 124, !19, i64 125, !19, i64 126, !19, i64 127, !19, i64 128, !6, i64 136, !19, i64 144, !19, i64 145, !19, i64 146, !19, i64 147, !19, i64 148, !19, i64 149, !11, i64 152, !6, i64 160, !19, i64 168, !19, i64 169, !19, i64 170, !19, i64 171, !19, i64 172, !19, i64 173, !19, i64 174, !19, i64 175, !19, i64 176, !19, i64 177, !19, i64 178, !19, i64 179, !19, i64 180, !19, i64 181, !11, i64 184, !19, i64 188, !19, i64 189, !19, i64 190, !19, i64 191, !6, i64 192}
!19 = !{!"bool", !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"

%"struct.__sanitizer::CommonFlags" = type { i8, ptr, i8, ptr, i8, i8, i8, i8, i32, ptr, i8, i8, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i64, ptr, i8, i8, i8, i64, i64, i64, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, i8, i8, i8, i8, i8, i8, i32, ptr, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i8, i8, i8, i8, ptr }

@_ZN11__sanitizer21common_flags_dont_useE = external local_unnamed_addr global %"struct.__sanitizer::CommonFlags", align 8

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11__sanitizer10FlagParser15skip_whitespaceEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11__sanitizer10FlagParser11parse_flagsEv(ptr noundef nonnull align 8 dereferenceable(32) %0) local_unnamed_addr #1 align 2 {
  tail call void @_ZN11__sanitizer10FlagParser15skip_whitespaceEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %2 = getelementptr inbounds i8, ptr %0, i64 16
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  %5 = load i64, ptr %4, align 8, !tbaa !12
  %6 = getelementptr inbounds i8, ptr %3, i64 %5
  %7 = load i8, ptr %6, align 1, !tbaa !13
  %8 = icmp eq i8 %7, 0
  br i1 %8, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %1, %.lr.ph
  tail call void @_ZN11__sanitizer10FlagParser10parse_flagEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  tail call void @_ZN11__sanitizer10FlagParser15skip_whitespaceEv(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = load i64, ptr %4, align 8, !tbaa !12
  %11 = getelementptr inbounds i8, ptr %9, i64 %10
  %12 = load i8, ptr %11, align 1, !tbaa !13
  %13 = icmp eq i8 %12, 0
  br i1 %13, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %1
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @_ZN11__sanitizer21common_flags_dont_useE, i64 36), align 4, !tbaa !16
  %15 = icmp slt i32 %14, 1
  br i1 %15, label %16, label %17

16:                                               ; preds = %._crit_edge
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZN11__sanitizer21common_flags_dont_useE, i64 36), align 4, !tbaa !16
  br label %17

17:                                               ; preds = %16, %._crit_edge
  ret void
}

attributes #0 = { 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 #1 = { 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, !7, i64 16}
!6 = !{!"_ZTSN11__sanitizer10FlagParserE", !7, i64 0, !10, i64 8, !7, i64 16, !11, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!6, !11, i64 24}
!13 = !{!8, !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !10, i64 36}
!17 = !{!"_ZTSN11__sanitizer11CommonFlagsE", !18, i64 0, !7, i64 8, !18, i64 16, !7, i64 24, !18, i64 32, !18, i64 33, !18, i64 34, !18, i64 35, !10, i64 36, !7, i64 40, !18, i64 48, !18, i64 49, !10, i64 52, !18, i64 56, !18, i64 57, !18, i64 58, !18, i64 59, !18, i64 60, !18, i64 61, !18, i64 62, !18, i64 63, !18, i64 64, !18, i64 65, !18, i64 66, !18, i64 67, !11, i64 72, !7, i64 80, !18, i64 88, !18, i64 89, !18, i64 90, !11, i64 96, !11, i64 104, !11, i64 112, !18, i64 120, !18, i64 121, !18, i64 122, !18, i64 123, !18, i64 124, !18, i64 125, !18, i64 126, !18, i64 127, !18, i64 128, !7, i64 136, !18, i64 144, !18, i64 145, !18, i64 146, !18, i64 147, !18, i64 148, !18, i64 149, !10, i64 152, !7, i64 160, !18, i64 168, !18, i64 169, !18, i64 170, !18, i64 171, !18, i64 172, !18, i64 173, !18, i64 174, !18, i64 175, !18, i64 176, !18, i64 177, !18, i64 178, !18, i64 179, !18, i64 180, !18, i64 181, !10, i64 184, !18, i64 188, !18, i64 189, !18, i64 190, !18, i64 191, !7, i64 192}
!18 = !{!"bool", !8, i64 0}


; Effective O3 passes: GlobalOptPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass