; LLVM IR from quantumlib/qsim :: apps/qsimh_amplitudes.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::__cxx11::basic_string", %"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 [22 x i8], align 1
@optarg = external global ptr, align 8
@_ZL5usage = external hidden constant [180 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(149) %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 = %83, %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 %84

20:                                               ; preds = %15
  %21 = load i32, ptr %8, align 4, !tbaa !5
  switch i32 %21, label %81 [
    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 105, label %61
    i32 111, label %66
    i32 116, label %71
    i32 118, label %75
    i32 122, label %79
  ]

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 %83

27:                                               ; preds = %81, %66, %61, %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 %86

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 5
  store i32 %33, ptr %34, align 8, !tbaa !11
  br label %83

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 3
  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 %83

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 %86

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 4
  store i64 %51, ptr %52, align 8, !tbaa !21
  br label %83

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 6
  store i32 %55, ptr %56, align 4, !tbaa !22
  br label %83

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 7
  store i32 %59, ptr %60, align 8, !tbaa !23
  br label %83

61:                                               ; preds = %20
  %62 = load ptr, ptr @optarg, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 1
  %64 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %63, ptr noundef %62)
          to label %65 unwind label %27

65:                                               ; preds = %61
  br label %83

66:                                               ; preds = %20
  %67 = load ptr, ptr @optarg, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 2
  %69 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %68, ptr noundef %67)
          to label %70 unwind label %27

70:                                               ; preds = %66
  br label %83

71:                                               ; preds = %20
  %72 = load ptr, ptr @optarg, align 8, !tbaa !9
  %73 = call i32 @atoi(ptr noundef %72) #9
  %74 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 8
  store i32 %73, ptr %74, align 4, !tbaa !24
  br label %83

75:                                               ; preds = %20
  %76 = load ptr, ptr @optarg, align 8, !tbaa !9
  %77 = call i32 @atoi(ptr noundef %76) #9
  %78 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 9
  store i32 %77, ptr %78, align 8, !tbaa !25
  br label %83

79:                                               ; preds = %20
  %80 = getelementptr inbounds %struct.Options, ptr %0, i32 0, i32 10
  store i8 1, ptr %80, align 4, !tbaa !26
  br label %83

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

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

83:                                               ; preds = %79, %75, %71, %70, %65, %57, %53, %49, %39, %31, %26
  br label %15, !llvm.loop !27

84:                                               ; 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
  %85 = load i1, ptr %7, align 1
  br i1 %85, label %88, label %87

86:                                               ; 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(149) %0) #8
  br label %89

87:                                               ; preds = %84
  call void @_ZN7OptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(149) %0) #8
  br label %88

88:                                               ; preds = %87, %84
  ret void

89:                                               ; preds = %86
  %90 = load ptr, ptr %10, align 8
  %91 = load i32, ptr %11, align 4
  %92 = insertvalue { ptr, i32 } poison, ptr %90, 0
  %93 = insertvalue { ptr, i32 } %92, i32 %91, 1
  resume { ptr, i32 } %93
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7OptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(149)) 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(149)) 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 128}
!12 = !{!"_ZTS7Options", !13, i64 0, !13, i64 32, !13, i64 64, !16, i64 96, !15, i64 120, !6, i64 128, !6, i64 132, !6, i64 136, !6, i64 140, !6, i64 144, !20, i64 148}
!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 120}
!22 = !{!12, !6, i64 132}
!23 = !{!12, !6, i64 136}
!24 = !{!12, !6, i64 140}
!25 = !{!12, !6, i64 144}
!26 = !{!12, !20, i64 148}
!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::__cxx11::basic_string", %"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 [22 x i8], align 1
@optarg = external local_unnamed_addr global ptr, align 8
@_ZL5usage = external hidden constant [180 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(149) %0) #8
  %6 = getelementptr inbounds i8, ptr %0, i64 148
  %7 = getelementptr inbounds i8, ptr %0, i64 144
  %8 = getelementptr inbounds i8, ptr %0, i64 140
  %9 = getelementptr inbounds i8, ptr %0, i64 64
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = getelementptr inbounds i8, ptr %0, i64 136
  %12 = getelementptr inbounds i8, ptr %0, i64 132
  %13 = getelementptr inbounds i8, ptr %0, i64 120
  %14 = getelementptr inbounds i8, ptr %0, i64 96
  %15 = getelementptr inbounds i8, ptr %0, i64 128
  br label %16

16:                                               ; preds = %.backedge, %3
  %17 = call i32 @getopt(i32 noundef %1, ptr noundef %2, ptr noundef nonnull @.str) #8
  switch i32 %17, label %53 [
    i32 -1, label %55
    i32 99, label %.invoke
    i32 100, label %20
    i32 107, label %23
    i32 119, label %32
    i32 112, label %35
    i32 114, label %38
    i32 105, label %41
    i32 111, label %42
    i32 116, label %46
    i32 118, label %49
    i32 122, label %52
  ]

18:                                               ; preds = %.invoke
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %54

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

23:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  %24 = 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 %24, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %25 unwind label %27

25:                                               ; preds = %23
  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) %14)
          to label %26 unwind label %29

26:                                               ; preds = %25
  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

27:                                               ; preds = %23
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %31

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

31:                                               ; preds = %29, %27
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ]
  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 %54

32:                                               ; preds = %16
  %33 = load ptr, ptr @optarg, align 8, !tbaa !5
  %34 = call i64 @atol(ptr nocapture noundef %33) #9
  store i64 %34, ptr %13, align 8, !tbaa !20
  br label %.backedge

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

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

41:                                               ; preds = %16
  br label %.invoke

42:                                               ; preds = %16
  br label %.invoke

.invoke:                                          ; preds = %16, %41, %42
  %43 = phi ptr [ %9, %42 ], [ %10, %41 ], [ %0, %16 ]
  %44 = load ptr, ptr @optarg, align 8, !tbaa !5
  %45 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %43, ptr noundef %44)
          to label %.backedge unwind label %18

.backedge:                                        ; preds = %.invoke, %52, %49, %46, %38, %35, %32, %26, %20
  br label %16, !llvm.loop !23

46:                                               ; preds = %16
  %47 = load ptr, ptr @optarg, align 8, !tbaa !5
  %48 = call i32 @atoi(ptr nocapture noundef %47) #9
  store i32 %48, ptr %8, align 4, !tbaa !25
  br label %.backedge

49:                                               ; preds = %16
  %50 = load ptr, ptr @optarg, align 8, !tbaa !5
  %51 = call i32 @atoi(ptr nocapture noundef %50) #9
  store i32 %51, ptr %7, align 8, !tbaa !26
  br label %.backedge

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

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

54:                                               ; preds = %31, %18
  %.pn9 = phi { ptr, i32 } [ %19, %18 ], [ %.pn, %31 ]
  call void @_ZN7OptionsD2Ev(ptr noundef nonnull align 8 dereferenceable(149) %0) #8
  resume { ptr, i32 } %.pn9

55:                                               ; preds = %16
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7OptionsC2Ev(ptr noundef nonnull align 8 dereferenceable(149)) 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(149)) 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 = !{!10, !18, i64 128}
!10 = !{!"_ZTS7Options", !11, i64 0, !11, i64 32, !11, i64 64, !14, i64 96, !13, i64 120, !18, i64 128, !18, i64 132, !18, i64 136, !18, i64 140, !18, i64 144, !19, i64 148}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIjSaIjEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"int", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!10, !13, i64 120}
!21 = !{!10, !18, i64 132}
!22 = !{!10, !18, i64 136}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!10, !18, i64 140}
!26 = !{!10, !18, i64 144}
!27 = !{!10, !19, i64 148}


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