; LLVM IR from hbirchtree/coffeecutie :: src/peripheral/platform/private/argument_parse.ll (ZN8platform4args6AppArg5CloneEiPPc)

; 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.stl_types::range<>::iterator" = type { i64, i64, i64 }
%"struct.platform::args::AppArg" = type { %"class.std::vector", ptr, %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.stl_types::range" = type { i64, i64 }
%"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::allocator.5" = type { i8 }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEEC2Emm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.stl_types::range<>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.stl_types::range<>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorneERKS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8platform4args6AppArg5CloneEiPPc(ptr dead_on_unwind noalias writable sret(%"struct.platform::args::AppArg") align 8 %0, i32 noundef %1, ptr noundef %2) #0 align 2 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 ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.stl_types::range", align 8
  %12 = alloca %"struct.stl_types::range<>::iterator", align 8
  %13 = alloca %"struct.stl_types::range<>::iterator", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.5", 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 @_ZN8platform4args6AppArgC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %19, label %24

19:                                               ; preds = %3
  %20 = load ptr, ptr %6, align 8, !tbaa !9
  %21 = getelementptr inbounds ptr, ptr %20, i64 0
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = getelementptr inbounds %"struct.platform::args::AppArg", ptr %0, i32 0, i32 1
  store ptr %22, ptr %23, align 8, !tbaa !11
  br label %24

24:                                               ; preds = %19, %3
  %25 = load i32, ptr %5, align 4, !tbaa !5
  %26 = add nsw i32 %25, -1
  store i32 %26, ptr %5, align 4, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !9
  %28 = getelementptr inbounds ptr, ptr %27, i32 1
  store ptr %28, ptr %6, align 8, !tbaa !9
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = icmp slt i32 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %24
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %31, %24
  %33 = getelementptr inbounds %"struct.platform::args::AppArg", ptr %0, i32 0, i32 2
  %34 = load i32, ptr %5, align 4, !tbaa !5
  %35 = invoke noundef i32 @_ZL7C_FCASTIjiTnPNSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_integralIT0_EE5valueEvE4typeELPv0ETnPNS0_IXaaleclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS1_EE3maxEgeclsr3std14numeric_limitsIS2_EE3minEclsr3std14numeric_limitsIS1_EE3minEEvE4typeELS6_0ETnPNS0_IXeqsr3std9is_signedIS1_EE5valuesr3std9is_signedIS1_EE5valueEvE4typeELS6_0EES1_S2_(i32 noundef %34)
          to label %36 unwind label %52

36:                                               ; preds = %32
  %37 = zext i32 %35 to i64
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %33, i64 noundef %37)
          to label %38 unwind label %52

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = invoke noundef i32 @_ZL7C_FCASTIjiTnPNSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_integralIT0_EE5valueEvE4typeELPv0ETnPNS0_IXaaleclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS1_EE3maxEgeclsr3std14numeric_limitsIS2_EE3minEclsr3std14numeric_limitsIS1_EE3minEEvE4typeELS6_0ETnPNS0_IXeqsr3std9is_signedIS1_EE5valuesr3std9is_signedIS1_EE5valueEvE4typeELS6_0EES1_S2_(i32 noundef %39)
          to label %41 unwind label %56

41:                                               ; preds = %38
  %42 = zext i32 %40 to i64
  invoke void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEEC2Emm(ptr noundef nonnull align 8 dereferenceable(16) %11, i64 noundef %42, i64 noundef 1)
          to label %43 unwind label %56

43:                                               ; preds = %41
  store ptr %11, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  %44 = load ptr, ptr %10, align 8, !tbaa !9
  invoke void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE5beginEv(ptr dead_on_unwind writable sret(%"struct.stl_types::range<>::iterator") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %44)
          to label %45 unwind label %60

45:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  %46 = load ptr, ptr %10, align 8, !tbaa !9
  invoke void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE3endEv(ptr dead_on_unwind writable sret(%"struct.stl_types::range<>::iterator") align 8 %13, ptr noundef nonnull align 8 dereferenceable(16) %46)
          to label %47 unwind label %64

47:                                               ; preds = %45
  br label %48

48:                                               ; preds = %80, %47
  %49 = invoke noundef zeroext i1 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorneERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %50 unwind label %64

50:                                               ; preds = %48
  br i1 %49, label %68, label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %98

52:                                               ; preds = %98, %36, %32
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %8, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %9, align 4
  br label %103

56:                                               ; preds = %41, %38
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  br label %97

60:                                               ; preds = %43
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %8, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %9, align 4
  br label %96

64:                                               ; preds = %78, %48, %45
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %8, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %9, align 4
  br label %95

68:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %69 = invoke noundef i64 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %70 unwind label %81

70:                                               ; preds = %68
  store i64 %69, ptr %14, align 8, !tbaa !21
  %71 = getelementptr inbounds %"struct.platform::args::AppArg", ptr %0, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  %72 = load ptr, ptr %6, align 8, !tbaa !9
  %73 = load i64, ptr %14, align 8, !tbaa !21
  %74 = getelementptr inbounds ptr, ptr %72, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %75, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %76 unwind label %85

76:                                               ; preds = %70
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %71, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %77 unwind label %89

77:                                               ; preds = %76
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %78

78:                                               ; preds = %77
  %79 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %80 unwind label %64

80:                                               ; preds = %78
  br label %48

81:                                               ; preds = %68
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %8, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %9, align 4
  br label %94

85:                                               ; preds = %70
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  br label %93

89:                                               ; preds = %76
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %8, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br label %93

93:                                               ; preds = %89, %85
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  br label %94

94:                                               ; preds = %93, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %95

95:                                               ; preds = %94, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  br label %96

96:                                               ; preds = %95, %60
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  br label %97

97:                                               ; preds = %96, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %103

98:                                               ; preds = %51
  invoke void @_ZN8platform4args6AppArg11rebuildArgsEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
          to label %99 unwind label %52

99:                                               ; preds = %98
  store i1 true, ptr %7, align 1
  %100 = load i1, ptr %7, align 1
  br i1 %100, label %102, label %101

101:                                              ; preds = %99
  call void @_ZN8platform4args6AppArgD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  br label %102

102:                                              ; preds = %101, %99
  ret void

103:                                              ; preds = %97, %52
  call void @_ZN8platform4args6AppArgD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %8, align 8
  %106 = load i32, ptr %9, align 4
  %107 = insertvalue { ptr, i32 } poison, ptr %105, 0
  %108 = insertvalue { ptr, i32 } %107, i32 %106, 1
  resume { ptr, i32 } %108
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8platform4args6AppArgC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL7C_FCASTIjiTnPNSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_integralIT0_EE5valueEvE4typeELPv0ETnPNS0_IXaaleclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS1_EE3maxEgeclsr3std14numeric_limitsIS2_EE3minEclsr3std14numeric_limitsIS1_EE3minEEvE4typeELS6_0ETnPNS0_IXeqsr3std9is_signedIS1_EE5valuesr3std9is_signedIS1_EE5valueEvE4typeELS6_0EES1_S2_(i32 noundef) #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8platform4args6AppArgD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { 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, !10, i64 24}
!12 = !{!"_ZTSN8platform4args6AppArgE", !13, i64 0, !10, i64 24, !17, i64 32}
!13 = !{!"_ZTSSt6vectorIPcSaIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIPcSaIS0_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!17 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!21 = !{!22, !22, i64 0}
!22 = !{!"long", !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.stl_types::range<>::iterator" = type { i64, i64, i64 }
%"struct.platform::args::AppArg" = type { %"class.std::vector", ptr, %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.stl_types::range" = type { i64, i64 }
%"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::allocator.5" = type { i8 }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEEC2Emm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i64 noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE5beginEv(ptr dead_on_unwind noalias writable sret(%"struct.stl_types::range<>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE3endEv(ptr dead_on_unwind noalias writable sret(%"struct.stl_types::range<>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorneERKS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8platform4args6AppArg5CloneEiPPc(ptr dead_on_unwind noalias nonnull writable sret(%"struct.platform::args::AppArg") align 8 %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.stl_types::range", align 8
  %5 = alloca %"struct.stl_types::range<>::iterator", align 8
  %6 = alloca %"struct.stl_types::range<>::iterator", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.5", align 1
  tail call void @_ZN8platform4args6AppArgC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  %9 = icmp sgt i32 %1, 0
  br i1 %9, label %10, label %13

10:                                               ; preds = %3
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %11, ptr %12, align 8, !tbaa !9
  br label %13

13:                                               ; preds = %10, %3
  %14 = getelementptr inbounds i8, ptr %2, i64 8
  %15 = tail call i32 @llvm.smax.i32(i32 %1, i32 1)
  %spec.store.select = add nsw i32 %15, -1
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  %17 = tail call noundef i32 @_ZL7C_FCASTIjiTnPNSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_integralIT0_EE5valueEvE4typeELPv0ETnPNS0_IXaaleclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS1_EE3maxEgeclsr3std14numeric_limitsIS2_EE3minEclsr3std14numeric_limitsIS1_EE3minEEvE4typeELS6_0ETnPNS0_IXeqsr3std9is_signedIS1_EE5valuesr3std9is_signedIS1_EE5valueEvE4typeELS6_0EES1_S2_(i32 noundef %spec.store.select)
  %18 = zext i32 %17 to i64
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %16, i64 noundef %18)
          to label %19 unwind label %24

19:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %20 = tail call noundef i32 @_ZL7C_FCASTIjiTnPNSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_integralIT0_EE5valueEvE4typeELPv0ETnPNS0_IXaaleclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS1_EE3maxEgeclsr3std14numeric_limitsIS2_EE3minEclsr3std14numeric_limitsIS1_EE3minEEvE4typeELS6_0ETnPNS0_IXeqsr3std9is_signedIS1_EE5valuesr3std9is_signedIS1_EE5valueEvE4typeELS6_0EES1_S2_(i32 noundef %spec.store.select)
  %21 = zext i32 %20 to i64
  call void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEEC2Emm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %21, i64 noundef 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  invoke void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE5beginEv(ptr dead_on_unwind nonnull writable sret(%"struct.stl_types::range<>::iterator") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %22 unwind label %26

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  invoke void @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE3endEv(ptr dead_on_unwind nonnull writable sret(%"struct.stl_types::range<>::iterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %.preheader unwind label %28

.preheader:                                       ; preds = %22
  %23 = call noundef zeroext i1 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorneERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %34, %.preheader
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  invoke void @_ZN8platform4args6AppArg11rebuildArgsEv(ptr noundef nonnull align 8 dereferenceable(56) %0)
          to label %44 unwind label %24

24:                                               ; preds = %._crit_edge, %13
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %45

26:                                               ; preds = %19
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %43

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

.lr.ph:                                           ; preds = %.preheader, %34
  %30 = call noundef i64 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %31 = getelementptr inbounds ptr, ptr %14, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %32, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %33 unwind label %37

33:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %34 unwind label %39

34:                                               ; preds = %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorppEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %36 = call noundef zeroext i1 @_ZNK9stl_types5rangeImNS_12range_paramsILb0EEEE8iteratorneERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
  br i1 %36, label %.lr.ph, label %._crit_edge

37:                                               ; preds = %.lr.ph
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %33
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %41

41:                                               ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %42

42:                                               ; preds = %41, %28
  %.pn.pn = phi { ptr, i32 } [ %.pn, %41 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %43

43:                                               ; preds = %42, %26
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %42 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %45

44:                                               ; preds = %._crit_edge
  ret void

45:                                               ; preds = %43, %24
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %43 ], [ %25, %24 ]
  call void @_ZN8platform4args6AppArgD2Ev(ptr noundef nonnull align 8 dereferenceable(56) %0) #5
  resume { ptr, i32 } %.pn.pn.pn.pn
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8platform4args6AppArgC2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL7C_FCASTIjiTnPNSt9enable_ifIXaasr3std11is_integralIT_EE5valuesr3std11is_integralIT0_EE5valueEvE4typeELPv0ETnPNS0_IXaaleclsr3std14numeric_limitsIS2_EE3maxEclsr3std14numeric_limitsIS1_EE3maxEgeclsr3std14numeric_limitsIS2_EE3minEclsr3std14numeric_limitsIS1_EE3minEEvE4typeELS6_0ETnPNS0_IXeqsr3std9is_signedIS1_EE5valuesr3std9is_signedIS1_EE5valueEvE4typeELS6_0EES1_S2_(i32 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN8platform4args6AppArgD2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !6, i64 24}
!10 = !{!"_ZTSN8platform4args6AppArgE", !11, i64 0, !6, i64 24, !15, i64 32}
!11 = !{!"_ZTSSt6vectorIPcSaIS0_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIPcSaIS0_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPcSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


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