; LLVM IR from quantumlib/qsim :: apps/qsimh_base.ll (Z10GetOptionsiPPc)

; 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.Options = type <{ %"class.std::__cxx11::basic_string", %"class.std::vector", i64, i32, i32, i32, i32, i32, i8, [3 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.anon = type { i8 }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@optarg = external global ptr, align 8
@_ZL5usage = external hidden constant [150 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10GetOptionsiPPc(ptr dead_on_unwind noalias writable sret(%struct.Options) align 8 %0, i32 noundef %1, ptr noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca i32, align 4
  %9 = alloca %class.anon, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator", align 1
  %14 = alloca %class.anon, align 1
  store ptr %0, ptr %4, align 8
  store i32 %1, ptr %5, align 4, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !9
  store i1 false, ptr %7, align 1
  call void @_ZN7OptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(85) %0) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #8
  br label %15

15:                                               ; preds = %73, %3
  %16 = load i32, ptr %5, align 4, !tbaa !5
  %17 = load ptr, ptr %6, align 8, !tbaa !9
  %18 = call i32 @getopt(i32 noundef %16, ptr noundef %17, ptr noundef @.str) #8
  store i32 %18, ptr %8, align 4, !tbaa !5
  %19 = icmp ne i32 %18, -1
  br i1 %19, label %20, label %74

20:                                               ; preds = %15
  %21 = load i32, ptr %8, align 4, !tbaa !5
  switch i32 %21, label %71 [
    i32 99, label %22
    i32 100, label %31
    i32 107, label %35
    i32 119, label %49
    i32 112, label %53
    i32 114, label %57
    i32 116, label %61
    i32 118, label %65
    i32 122, label %69
  ]

22:                                               ; preds = %20
  %23 = load ptr, ptr @optarg, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 0
  %25 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef %23)
          to label %26 unwind label %27

26:                                               ; preds = %22
  br label %73

27:                                               ; preds = %71, %22
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %10, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %11, align 4
  br label %76

31:                                               ; preds = %20
  %32 = load ptr, ptr @optarg, align 8, !tbaa !9
  %33 = call i32 @atoi(ptr noundef %32) #9
  %34 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 3
  store i32 %33, ptr %34, align 8, !tbaa !11
  br label %73

35:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #8
  %36 = load ptr, ptr @optarg, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %36, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %37 unwind label %40

37:                                               ; preds = %35
  %38 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 1
  invoke void @"_ZN4qsim11SplitStringIZ10GetOptionsiPPcE3$_0St6vectorIjSaIjEEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcT_RT0_"(ptr noundef nonnull align 8 dereferenceable(32) %12, i8 noundef signext 44, ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %39 unwind label %44

39:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %73

40:                                               ; preds = %35
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %10, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %11, align 4
  br label %48

44:                                               ; preds = %37
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #8
  br label %48

48:                                               ; preds = %44, %40
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %76

49:                                               ; preds = %20
  %50 = load ptr, ptr @optarg, align 8, !tbaa !9
  %51 = call i64 @atol(ptr noundef %50) #9
  %52 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 2
  store i64 %51, ptr %52, align 8, !tbaa !21
  br label %73

53:                                               ; preds = %20
  %54 = load ptr, ptr @optarg, align 8, !tbaa !9
  %55 = call i32 @atoi(ptr noundef %54) #9
  %56 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 4
  store i32 %55, ptr %56, align 4, !tbaa !22
  br label %73

57:                                               ; preds = %20
  %58 = load ptr, ptr @optarg, align 8, !tbaa !9
  %59 = call i32 @atoi(ptr noundef %58) #9
  %60 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 5
  store i32 %59, ptr %60, align 8, !tbaa !23
  br label %73

61:                                               ; preds = %20
  %62 = load ptr, ptr @optarg, align 8, !tbaa !9
  %63 = call i32 @atoi(ptr noundef %62) #9
  %64 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 6
  store i32 %63, ptr %64, align 4, !tbaa !24
  br label %73

65:                                               ; preds = %20
  %66 = load ptr, ptr @optarg, align 8, !tbaa !9
  %67 = call i32 @atoi(ptr noundef %66) #9
  %68 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 7
  store i32 %67, ptr %68, align 8, !tbaa !25
  br label %73

69:                                               ; preds = %20
  %70 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 8
  store i8 1, ptr %70, align 4, !tbaa !26
  br label %73

71:                                               ; preds = %20
  invoke void (ptr, ...) @_ZN4qsim2IO6errorfEPKcz(ptr noundef @_ZL5usage)
          to label %72 unwind label %27

72:                                               ; preds = %71
  call void @exit(i32 noundef 1) #10
  unreachable

73:                                               ; preds = %69, %65, %61, %57, %53, %49, %39, %31, %26
  br label %15, !llvm.loop !27

74:                                               ; preds = %15
  store i1 true, ptr %7, align 1
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  %75 = load i1, ptr %7, align 1
  br i1 %75, label %78, label %77

76:                                               ; preds = %48, %27
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @_ZN7OptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(85) %0) #8
  br label %79

77:                                               ; preds = %74
  call void @_ZN7OptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(85) %0) #8
  br label %78

78:                                               ; preds = %77, %74
  ret void

79:                                               ; preds = %76
  %80 = load ptr, ptr %10, align 8
  %81 = load i32, ptr %11, align 4
  %82 = insertvalue { ptr, i32 } poison, ptr %80, 0
  %83 = insertvalue { ptr, i32 } %82, i32 %81, 1
  resume { ptr, i32 } %83
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7OptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(85)) unnamed_addr #1 align 2

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZN4qsim11SplitStringIZ10GetOptionsiPPcE3$_0St6vectorIjSaIjEEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcT_RT0_"(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext, ptr noundef nonnull align 8 dereferenceable(24)) #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr noundef nonnull) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4qsim2IO6errorfEPKcz(ptr noundef, ...) #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7OptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(85)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 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 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress nounwind willreturn memory(read) 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 #5 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 64}
!12 = !{!"_ZTS7Options", !13, i64 0, !16, i64 32, !15, i64 56, !6, i64 64, !6, i64 68, !6, i64 72, !6, i64 76, !6, i64 80, !20, i64 84}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!20 = !{!"bool", !7, i64 0}
!21 = !{!12, !15, i64 56}
!22 = !{!12, !6, i64 68}
!23 = !{!12, !6, i64 72}
!24 = !{!12, !6, i64 76}
!25 = !{!12, !6, i64 80}
!26 = !{!12, !20, i64 84}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; 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.Options = type <{ %"class.std::__cxx11::basic_string", %"class.std::vector", i64, i32, i32, i32, i32, i32, i8, [3 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@_ZL5usage = external hidden constant [150 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local void @_Z10GetOptionsiPPc(ptr dead_on_unwind noalias nonnull writable sret(%struct.Options) align 8 %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  tail call void @_ZN7OptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(85) %0) #8
  %6 = getelementptr inbounds i8, ptr %0, i64 84
  %7 = getelementptr inbounds i8, ptr %0, i64 80
  %8 = getelementptr inbounds i8, ptr %0, i64 76
  %9 = getelementptr inbounds i8, ptr %0, i64 72
  %10 = getelementptr inbounds i8, ptr %0, i64 68
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  %12 = getelementptr inbounds i8, ptr %0, i64 32
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  br label %14

14:                                               ; preds = %.backedge, %3
  %15 = call i32 @getopt(i32 noundef %1, ptr noundef %2, ptr noundef nonnull @.str) #8
  switch i32 %15, label %49 [
    i32 -1, label %51
    i32 99, label %16
    i32 100, label %21
    i32 107, label %24
    i32 119, label %33
    i32 112, label %36
    i32 114, label %39
    i32 116, label %42
    i32 118, label %45
    i32 122, label %48
  ]

16:                                               ; preds = %14
  %17 = load ptr, ptr @optarg, align 8, !tbaa !5
  %18 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef %17)
          to label %.backedge unwind label %19

.backedge:                                        ; preds = %16, %48, %45, %42, %39, %36, %33, %27, %21
  br label %14, !llvm.loop !9

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %50

21:                                               ; preds = %14
  %22 = load ptr, ptr @optarg, align 8, !tbaa !5
  %23 = call i32 @atoi(ptr nocapture noundef %22) #9
  store i32 %23, ptr %13, align 8, !tbaa !11
  br label %.backedge

24:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  %25 = load ptr, ptr @optarg, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %25, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %26 unwind label %28

26:                                               ; preds = %24
  invoke void @"_ZN4qsim11SplitStringIZ10GetOptionsiPPcE3$_0St6vectorIjSaIjEEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcT_RT0_"(ptr noundef nonnull align 8 dereferenceable(32) %4, i8 noundef signext 44, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %27 unwind label %30

27:                                               ; preds = %26
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %.backedge

28:                                               ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %26
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #8
  br label %32

32:                                               ; preds = %30, %28
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %50

33:                                               ; preds = %14
  %34 = load ptr, ptr @optarg, align 8, !tbaa !5
  %35 = call i64 @atol(ptr nocapture noundef %34) #9
  store i64 %35, ptr %11, align 8, !tbaa !22
  br label %.backedge

36:                                               ; preds = %14
  %37 = load ptr, ptr @optarg, align 8, !tbaa !5
  %38 = call i32 @atoi(ptr nocapture noundef %37) #9
  store i32 %38, ptr %10, align 4, !tbaa !23
  br label %.backedge

39:                                               ; preds = %14
  %40 = load ptr, ptr @optarg, align 8, !tbaa !5
  %41 = call i32 @atoi(ptr nocapture noundef %40) #9
  store i32 %41, ptr %9, align 8, !tbaa !24
  br label %.backedge

42:                                               ; preds = %14
  %43 = load ptr, ptr @optarg, align 8, !tbaa !5
  %44 = call i32 @atoi(ptr nocapture noundef %43) #9
  store i32 %44, ptr %8, align 4, !tbaa !25
  br label %.backedge

45:                                               ; preds = %14
  %46 = load ptr, ptr @optarg, align 8, !tbaa !5
  %47 = call i32 @atoi(ptr nocapture noundef %46) #9
  store i32 %47, ptr %7, align 8, !tbaa !26
  br label %.backedge

48:                                               ; preds = %14
  store i8 1, ptr %6, align 4, !tbaa !27
  br label %.backedge

49:                                               ; preds = %14
  call void (ptr, ...) @_ZN4qsim2IO6errorfEPKcz(ptr noundef nonnull @_ZL5usage)
  call void @exit(i32 noundef 1) #10
  unreachable

50:                                               ; preds = %32, %19
  %.pn.pn = phi { ptr, i32 } [ %.pn, %32 ], [ %20, %19 ]
  call void @_ZN7OptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(85) %0) #8
  resume { ptr, i32 } %.pn.pn

51:                                               ; preds = %14
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7OptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(85)) unnamed_addr #1 align 2

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

; Function Attrs: nounwind
declare i32 @getopt(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZN4qsim11SplitStringIZ10GetOptionsiPPcE3$_0St6vectorIjSaIjEEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcT_RT0_"(ptr noundef nonnull align 8 dereferenceable(32), i8 noundef signext, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i64 @atol(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4qsim2IO6errorfEPKcz(ptr noundef, ...) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7OptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(85)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 #5 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !20, i64 64}
!12 = !{!"_ZTS7Options", !13, i64 0, !16, i64 32, !15, i64 56, !20, i64 64, !20, i64 68, !20, i64 72, !20, i64 76, !20, i64 80, !21, i64 84}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIjSaIjEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"int", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!12, !15, i64 56}
!23 = !{!12, !20, i64 68}
!24 = !{!12, !20, i64 72}
!25 = !{!12, !20, i64 76}
!26 = !{!12, !20, i64 80}
!27 = !{!12, !21, i64 84}


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