; LLVM IR from thepowersgang/mrustc :: tools/minipatch/main.ll (ZN4Opts5parseEiPPc)

; 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 }
%struct.Opts = type <{ ptr, ptr, i8, [7 x i8] }>

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4Opts5parseEiPPc(ptr noundef nonnull align 8 dereferenceable(17) %0, i32 noundef %1, ptr noundef %2) #1 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i8 0, ptr %8, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %13

13:                                               ; preds = %129, %3
  %14 = load i32, ptr %9, align 4, !tbaa !9
  %15 = load i32, ptr %6, align 4, !tbaa !9
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  store i32 2, ptr %10, align 4
  br label %132

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = load i32, ptr %9, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds ptr, ptr %19, i64 %21
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %23, ptr %11, align 8, !tbaa !5
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 0
  %26 = load i8, ptr %25, align 1, !tbaa !13
  %27 = sext i8 %26 to i32
  %28 = icmp ne i32 %27, 45
  br i1 %28, label %32, label %29

29:                                               ; preds = %18
  %30 = load i8, ptr %8, align 1, !tbaa !11, !range !14, !noundef !15
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %57

32:                                               ; preds = %29, %18
  %33 = getelementptr inbounds %struct.Opts, ptr %12, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = icmp ne ptr %34, null
  br i1 %35, label %39, label %36

36:                                               ; preds = %32
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.Opts, ptr %12, i32 0, i32 0
  store ptr %37, ptr %38, align 8, !tbaa !16
  br label %56

39:                                               ; preds = %32
  %40 = getelementptr inbounds %struct.Opts, ptr %12, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  %42 = icmp ne ptr %41, null
  br i1 %42, label %46, label %43

43:                                               ; preds = %39
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.Opts, ptr %12, i32 0, i32 1
  store ptr %44, ptr %45, align 8, !tbaa !18
  br label %55

46:                                               ; preds = %39
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.9)
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef %48)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @.str.5)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds ptr, ptr %52, i64 0
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  call void @_ZN4Opts5usageEPKc(ptr noundef nonnull align 8 dereferenceable(17) %12, ptr noundef %54)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %126

55:                                               ; preds = %43
  br label %56

56:                                               ; preds = %55, %36
  br label %125

57:                                               ; preds = %29
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 1
  %60 = load i8, ptr %59, align 1, !tbaa !13
  %61 = sext i8 %60 to i32
  %62 = icmp ne i32 %61, 45
  br i1 %62, label %63, label %91

63:                                               ; preds = %57
  br label %64

64:                                               ; preds = %89, %63
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i32 1
  store ptr %66, ptr %11, align 8, !tbaa !5
  %67 = load i8, ptr %66, align 1, !tbaa !13
  %68 = icmp ne i8 %67, 0
  br i1 %68, label %69, label %90

69:                                               ; preds = %64
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load i8, ptr %70, align 1, !tbaa !13
  %72 = sext i8 %71 to i32
  switch i32 %72, label %79 [
    i32 104, label %73
    i32 110, label %77
  ]

73:                                               ; preds = %69
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds ptr, ptr %74, i64 0
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  call void @_ZN4Opts4helpEPKc(ptr noundef nonnull align 8 dereferenceable(17) %12, ptr noundef %76)
  call void @exit(i32 noundef 0) #6
  unreachable

77:                                               ; preds = %69
  %78 = getelementptr inbounds %struct.Opts, ptr %12, i32 0, i32 2
  store i8 1, ptr %78, align 8, !tbaa !19
  br label %89

79:                                               ; preds = %69
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.10)
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = load i8, ptr %81, align 1, !tbaa !13
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %80, i8 noundef signext %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @.str.11)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds ptr, ptr %86, i64 0
  %88 = load ptr, ptr %87, align 8, !tbaa !5
  call void @_ZN4Opts5usageEPKc(ptr noundef nonnull align 8 dereferenceable(17) %12, ptr noundef %88)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %126

89:                                               ; preds = %77
  br label %64, !llvm.loop !20

90:                                               ; preds = %64
  br label %124

91:                                               ; preds = %57
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 2
  %94 = load i8, ptr %93, align 1, !tbaa !13
  %95 = sext i8 %94 to i32
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %122

97:                                               ; preds = %91
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = call i32 @strcmp(ptr noundef %98, ptr noundef @.str.12) #7
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %105

101:                                              ; preds = %97
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds ptr, ptr %102, i64 0
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  call void @_ZN4Opts4helpEPKc(ptr noundef nonnull align 8 dereferenceable(17) %12, ptr noundef %104)
  call void @exit(i32 noundef 0) #6
  unreachable

105:                                              ; preds = %97
  %106 = load ptr, ptr %11, align 8, !tbaa !5
  %107 = call i32 @strcmp(ptr noundef %106, ptr noundef @.str.13) #7
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %111

109:                                              ; preds = %105
  %110 = getelementptr inbounds %struct.Opts, ptr %12, i32 0, i32 2
  store i8 1, ptr %110, align 8, !tbaa !19
  br label %120

111:                                              ; preds = %105
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.14)
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef %113)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef @.str.11)
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds ptr, ptr %117, i64 0
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  call void @_ZN4Opts5usageEPKc(ptr noundef nonnull align 8 dereferenceable(17) %12, ptr noundef %119)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %126

120:                                              ; preds = %109
  br label %121

121:                                              ; preds = %120
  br label %123

122:                                              ; preds = %91
  store i8 1, ptr %8, align 1, !tbaa !11
  br label %123

123:                                              ; preds = %122, %121
  br label %124

124:                                              ; preds = %123, %90
  br label %125

125:                                              ; preds = %124, %56
  store i32 0, ptr %10, align 4
  br label %126

126:                                              ; preds = %125, %111, %79, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %127 = load i32, ptr %10, align 4
  switch i32 %127, label %132 [
    i32 0, label %128
  ]

128:                                              ; preds = %126
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr %9, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %9, align 4, !tbaa !9
  br label %13, !llvm.loop !22

132:                                              ; preds = %126, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %133 = load i32, ptr %10, align 4
  switch i32 %133, label %143 [
    i32 2, label %134
  ]

134:                                              ; preds = %132
  %135 = getelementptr inbounds %struct.Opts, ptr %12, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !16
  %137 = icmp ne ptr %136, null
  br i1 %137, label %142, label %138

138:                                              ; preds = %134
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = getelementptr inbounds ptr, ptr %139, i64 0
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  call void @_ZN4Opts5usageEPKc(ptr noundef nonnull align 8 dereferenceable(17) %12, ptr noundef %141)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %143

142:                                              ; preds = %134
  store i1 true, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %143

143:                                              ; preds = %142, %138, %132
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  %144 = load i1, ptr %4, align 1
  ret i1 %144
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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) #2

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

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

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
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 willreturn memory(read) "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 #5 = { nounwind }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind willreturn memory(read) }

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


; 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.5 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4Opts5parseEiPPc(ptr noundef nonnull align 8 dereferenceable(17) %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 align 2 {
  %.not4153 = icmp sgt i32 %1, 1
  %.promoted = load ptr, ptr %0, align 8, !tbaa !5
  br i1 %.not4153, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %3
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %.promoted56 = load ptr, ptr %5, align 8, !tbaa !11
  %wide.trip.count = zext nneg i32 %1 to i64
  br label %6

6:                                                ; preds = %.lr.ph, %.loopexit
  %indvars.iv = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next, %.loopexit ]
  %7 = phi ptr [ %.promoted56, %.lr.ph ], [ %49, %.loopexit ]
  %.03054 = phi i1 [ false, %.lr.ph ], [ %.2.ph, %.loopexit ]
  %8 = phi ptr [ %.promoted, %.lr.ph ], [ %50, %.loopexit ]
  %9 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv
  %10 = load ptr, ptr %9, align 8, !tbaa !12
  %11 = load i8, ptr %10, align 1, !tbaa !13
  %.not = icmp ne i8 %11, 45
  %brmerge = select i1 %.not, i1 true, i1 %.03054
  br i1 %brmerge, label %12, label %20

12:                                               ; preds = %6
  %.not39 = icmp eq ptr %8, null
  br i1 %.not39, label %13, label %14

13:                                               ; preds = %12
  store ptr %10, ptr %0, align 8, !tbaa !5
  br label %.loopexit

14:                                               ; preds = %12
  %.not40 = icmp eq ptr %7, null
  br i1 %.not40, label %15, label %16

15:                                               ; preds = %14
  store ptr %10, ptr %5, align 8, !tbaa !11
  br label %.loopexit

16:                                               ; preds = %14
  %17 = 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.9)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull %10)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str.5)
  br label %.sink.split.sink.split

20:                                               ; preds = %6
  %21 = getelementptr inbounds i8, ptr %10, i64 1
  %22 = load i8, ptr %21, align 1, !tbaa !13
  %.not36 = icmp eq i8 %22, 45
  br i1 %.not36, label %33, label %.preheader

.preheader:                                       ; preds = %20, %27
  %23 = phi i8 [ %.pre, %27 ], [ %22, %20 ]
  %.0 = phi ptr [ %24, %27 ], [ %10, %20 ]
  %24 = getelementptr inbounds i8, ptr %.0, i64 1
  switch i8 %23, label %28 [
    i8 0, label %.loopexit
    i8 104, label %25
    i8 110, label %27
  ]

25:                                               ; preds = %.preheader
  %26 = load ptr, ptr %2, align 8, !tbaa !12
  tail call void @_ZN4Opts4helpEPKc(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef %26)
  tail call void @exit(i32 noundef 0) #4
  unreachable

27:                                               ; preds = %.preheader
  store i8 1, ptr %4, align 8, !tbaa !14
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.0, i64 2
  %.pre = load i8, ptr %.phi.trans.insert, align 1, !tbaa !13
  br label %.preheader, !llvm.loop !15

28:                                               ; preds = %.preheader
  %29 = 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.10)
  %30 = load i8, ptr %24, align 1, !tbaa !13
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %29, i8 noundef signext %30)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str.11)
  br label %.sink.split.sink.split

33:                                               ; preds = %20
  %34 = getelementptr inbounds i8, ptr %10, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %.not37 = icmp eq i8 %35, 0
  br i1 %.not37, label %.loopexit, label %36

36:                                               ; preds = %33
  %37 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.12) #5
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %41

39:                                               ; preds = %36
  %40 = load ptr, ptr %2, align 8, !tbaa !12
  tail call void @_ZN4Opts4helpEPKc(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef %40)
  tail call void @exit(i32 noundef 0) #4
  unreachable

41:                                               ; preds = %36
  %42 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %10, ptr noundef nonnull dereferenceable(1) @.str.13) #5
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  store i8 1, ptr %4, align 8, !tbaa !14
  br label %.loopexit

45:                                               ; preds = %41
  %46 = 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.14)
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull %10)
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull @.str.11)
  br label %.sink.split.sink.split

.loopexit:                                        ; preds = %.preheader, %33, %44, %13, %15
  %49 = phi ptr [ %7, %33 ], [ %7, %44 ], [ %7, %13 ], [ %10, %15 ], [ %7, %.preheader ]
  %50 = phi ptr [ %8, %33 ], [ %8, %44 ], [ %10, %13 ], [ %8, %15 ], [ %8, %.preheader ]
  %.2.ph = phi i1 [ true, %33 ], [ false, %44 ], [ %.03054, %13 ], [ %.03054, %15 ], [ false, %.preheader ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %6, !llvm.loop !17

.critedge:                                        ; preds = %.loopexit, %3
  %51 = phi ptr [ %.promoted, %3 ], [ %50, %.loopexit ]
  %.not42 = icmp eq ptr %51, null
  br i1 %.not42, label %.sink.split, label %54

.sink.split.sink.split:                           ; preds = %45, %28, %16
  %.sink = phi ptr [ %19, %16 ], [ %32, %28 ], [ %48, %45 ]
  %52 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %.sink, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.sink.split

.sink.split:                                      ; preds = %.sink.split.sink.split, %.critedge
  %53 = load ptr, ptr %2, align 8, !tbaa !12
  tail call void @_ZN4Opts5usageEPKc(ptr noundef nonnull align 8 dereferenceable(17) %0, ptr noundef %53)
  br label %54

54:                                               ; preds = %.sink.split, %.critedge
  %.3 = phi i1 [ true, %.critedge ], [ false, %.sink.split ]
  ret i1 %.3
}

; 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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { noreturn nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 0}
!6 = !{!"_ZTS4Opts", !7, i64 0, !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!7, !7, i64 0}
!13 = !{!8, !8, i64 0}
!14 = !{!6, !10, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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