; LLVM IR from dynexcoin/Dynex :: src/Common (DnsTools)

; 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.__ns_msg = type { ptr, ptr, i16, i16, [4 x i16], [4 x ptr], i32, i32, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<__ns_type, std::pair<const __ns_type, std::function<void (const __ns_rr &)>>, std::_Select1st<std::pair<const __ns_type, std::function<void (const __ns_rr &)>>>, std::less<__ns_type>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<__ns_type, std::pair<const __ns_type, std::function<void (const __ns_rr &)>>, std::_Select1st<std::pair<const __ns_type, std::function<void (const __ns_rr &)>>>, std::less<__ns_type>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%class.anon = type { ptr }
%struct.__ns_rr = type { [1025 x i8], i16, i16, i32, i16, ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6Common13fetch_dns_txtENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS5_SaIS5_EE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.__ns_msg, align 8
  %7 = alloca i32, align 4
  %8 = alloca [4096 x i8], align 16
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::map", align 8
  %13 = alloca %class.anon, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.__ns_rr, align 8
  %19 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %20 = call i32 @__res_init() #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4096, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 16, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %21 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  store ptr %21, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = load i32, ptr %9, align 4, !tbaa !9
  %24 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %25 = call i32 @res_query(ptr noundef %22, i32 noundef 1, i32 noundef %23, ptr noundef %24, i32 noundef 4096) #4
  store i32 %25, ptr %7, align 4, !tbaa !11
  %26 = load i32, ptr %7, align 4, !tbaa !11
  %27 = icmp slt i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %2
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %30

29:                                               ; preds = %2
  store i32 0, ptr %11, align 4
  br label %30

30:                                               ; preds = %29, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %31 = load i32, ptr %11, align 4
  switch i32 %31, label %83 [
    i32 0, label %32
  ]

32:                                               ; preds = %30
  %33 = getelementptr inbounds [4096 x i8], ptr %8, i64 0, i64 0
  %34 = load i32, ptr %7, align 4, !tbaa !11
  %35 = call i32 @ns_initparse(ptr noundef %33, i32 noundef %34, ptr noundef %6) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #4
  call void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %36 = getelementptr inbounds %class.anon, ptr %13, i32 0, i32 0
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %37, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 16, ptr %14, align 4, !tbaa !9
  %38 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEEixEOS0_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %39 unwind label %50

39:                                               ; preds = %32
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRK7__ns_rrEEaSIZN6Common13fetch_dns_txtENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorISC_SaISC_EEE3$_0EENSt9enable_ifIXsrNS4_9_CallableIT_NSI_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISK_E4typeEE4typeES4_EE5valueESt5decayISK_EE4type4typeESt15__invoke_resultIRSV_JS2_EEEE5valueERS4_E4typeEOSK_"(ptr noundef nonnull align 8 dereferenceable(32) %38, ptr noundef nonnull align 8 dereferenceable(8) %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %41

41:                                               ; preds = %73, %39
  %42 = load i32, ptr %17, align 4, !tbaa !11
  %43 = getelementptr inbounds %struct.__ns_msg, ptr %6, i32 0, i32 4
  %44 = getelementptr inbounds [4 x i16], ptr %43, i64 0, i64 1
  %45 = load i16, ptr %44, align 2, !tbaa !13
  %46 = zext i16 %45 to i32
  %47 = add nsw i32 %46, 0
  %48 = icmp slt i32 %42, %47
  br i1 %48, label %54, label %49

49:                                               ; preds = %41
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %76

50:                                               ; preds = %32
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %15, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %82

54:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 1048, ptr %18) #4
  %55 = load i32, ptr %17, align 4, !tbaa !11
  %56 = call i32 @ns_parserr(ptr noundef %6, i32 noundef 1, i32 noundef %55, ptr noundef %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %57 = getelementptr inbounds %struct.__ns_rr, ptr %18, i32 0, i32 1
  %58 = load i16, ptr %57, align 2, !tbaa !15
  %59 = zext i16 %58 to i32
  %60 = add nsw i32 %59, 0
  store i32 %60, ptr %19, align 4, !tbaa !9
  %61 = invoke noundef i64 @_ZNKSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEE5countERSA_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %62 unwind label %68

62:                                               ; preds = %54
  %63 = icmp ne i64 %61, 0
  br i1 %63, label %64, label %72

64:                                               ; preds = %62
  %65 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(48) %12, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %66 unwind label %68

66:                                               ; preds = %64
  invoke void @_ZNKSt8functionIFvRK7__ns_rrEEclES2_(ptr noundef nonnull align 8 dereferenceable(32) %65, ptr noundef nonnull align 8 dereferenceable(1048) %18)
          to label %67 unwind label %68

67:                                               ; preds = %66
  br label %72

68:                                               ; preds = %66, %64, %54
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %15, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 1048, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %82

72:                                               ; preds = %67, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 1048, ptr %18) #4
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %17, align 4, !tbaa !11
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %17, align 4, !tbaa !11
  br label %41, !llvm.loop !17

76:                                               ; preds = %49
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = call noundef zeroext i1 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %77) #4
  br i1 %78, label %79, label %80

79:                                               ; preds = %76
  store i1 false, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %81

80:                                               ; preds = %76
  store i1 true, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %81

81:                                               ; preds = %80, %79
  call void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #4
  br label %83

82:                                               ; preds = %68, %50
  call void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %12) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4096, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #4
  br label %85

83:                                               ; preds = %81, %30
  call void @llvm.lifetime.end.p0(i64 4096, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %6) #4
  %84 = load i1, ptr %3, align 1
  ret i1 %84

85:                                               ; preds = %82
  %86 = load ptr, ptr %15, align 8
  %87 = load i32, ptr %16, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89
}

; Function Attrs: nounwind
declare i32 @__res_init() #1

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: nounwind
declare i32 @res_query(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: nounwind
declare i32 @ns_initparse(ptr noundef, i32 noundef, ptr noundef) #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRK7__ns_rrEEaSIZN6Common13fetch_dns_txtENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorISC_SaISC_EEE3$_0EENSt9enable_ifIXsrNS4_9_CallableIT_NSI_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISK_E4typeEE4typeES4_EE5valueESt5decayISK_EE4type4typeESt15__invoke_resultIRSV_JS2_EEEE5valueERS4_E4typeEOSK_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: nounwind
declare i32 @ns_parserr(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEE5countERSA_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS9__ns_type", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !14, i64 1026}
!16 = !{!"_ZTS7__ns_rr", !7, i64 0, !14, i64 1026, !14, i64 1028, !12, i64 1032, !14, i64 1036, !6, i64 1040}
!17 = distinct !{!17, !18}
!18 = !{!"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.__ns_msg = type { ptr, ptr, i16, i16, [4 x i16], [4 x ptr], i32, i32, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<__ns_type, std::pair<const __ns_type, std::function<void (const __ns_rr &)>>, std::_Select1st<std::pair<const __ns_type, std::function<void (const __ns_rr &)>>>, std::less<__ns_type>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<__ns_type, std::pair<const __ns_type, std::function<void (const __ns_rr &)>>, std::_Select1st<std::pair<const __ns_type, std::function<void (const __ns_rr &)>>>, std::less<__ns_type>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%class.anon = type { ptr }
%struct.__ns_rr = type { [1025 x i8], i16, i16, i32, i16, ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6Common13fetch_dns_txtENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIS5_SaIS5_EE(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.__ns_msg, align 8
  %4 = alloca [4096 x i8], align 16
  %5 = alloca %"class.std::map", align 8
  %6 = alloca %class.anon, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.__ns_rr, align 8
  %9 = alloca i32, align 4
  %10 = tail call i32 @__res_init() #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %4) #4
  %11 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #4
  %12 = call i32 @res_query(ptr noundef %11, i32 noundef 1, i32 noundef 16, ptr noundef nonnull %4, i32 noundef 4096) #4
  %13 = icmp sgt i32 %12, -1
  br i1 %13, label %14, label %42

14:                                               ; preds = %2
  %15 = call i32 @ns_initparse(ptr noundef nonnull %4, i32 noundef %12, ptr noundef nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  call void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store ptr %1, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 16, ptr %7, align 4, !tbaa !9
  %16 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEEixEOS0_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %17 unwind label %23

17:                                               ; preds = %14
  %18 = call noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRK7__ns_rrEEaSIZN6Common13fetch_dns_txtENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorISC_SaISC_EEE3$_0EENSt9enable_ifIXsrNS4_9_CallableIT_NSI_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISK_E4typeEE4typeES4_EE5valueESt5decayISK_EE4type4typeESt15__invoke_resultIRSV_JS2_EEEE5valueERS4_E4typeEOSK_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %19 = getelementptr inbounds i8, ptr %3, i64 22
  %20 = load i16, ptr %19, align 2, !tbaa !11
  %.not18 = icmp eq i16 %20, 0
  br i1 %.not18, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %17
  %21 = getelementptr inbounds i8, ptr %8, i64 1026
  br label %25

._crit_edge:                                      ; preds = %36, %17
  %22 = call noundef zeroext i1 @_ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %.1 = xor i1 %22, true
  call void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  br label %42

23:                                               ; preds = %14
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %41

25:                                               ; preds = %.lr.ph, %36
  %.017 = phi i32 [ 0, %.lr.ph ], [ %37, %36 ]
  call void @llvm.lifetime.start.p0(i64 1048, ptr nonnull %8) #4
  %26 = call i32 @ns_parserr(ptr noundef nonnull %3, i32 noundef 1, i32 noundef %.017, ptr noundef nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %27 = load i16, ptr %21, align 2, !tbaa !13
  %28 = zext i16 %27 to i32
  store i32 %28, ptr %9, align 4, !tbaa !9
  %29 = invoke noundef i64 @_ZNKSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEE5countERSA_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %30 unwind label %34

30:                                               ; preds = %25
  %.not = icmp eq i64 %29, 0
  br i1 %.not, label %36, label %31

31:                                               ; preds = %30
  %32 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %33 unwind label %34

33:                                               ; preds = %31
  invoke void @_ZNKSt8functionIFvRK7__ns_rrEEclES2_(ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 8 dereferenceable(1048) %8)
          to label %36 unwind label %34

34:                                               ; preds = %33, %31, %25
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 1048, ptr nonnull %8) #4
  br label %41

36:                                               ; preds = %33, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 1048, ptr nonnull %8) #4
  %37 = add nuw nsw i32 %.017, 1
  %38 = load i16, ptr %19, align 2, !tbaa !11
  %39 = zext i16 %38 to i32
  %40 = icmp ult i32 %37, %39
  br i1 %40, label %25, label %._crit_edge, !llvm.loop !16

41:                                               ; preds = %34, %23
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %24, %23 ]
  call void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

42:                                               ; preds = %2, %._crit_edge
  %.2 = phi i1 [ %.1, %._crit_edge ], [ false, %2 ]
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #4
  ret i1 %.2
}

; Function Attrs: nounwind
declare i32 @__res_init() local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare i32 @res_query(ptr noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind
declare i32 @ns_initparse(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef nonnull align 8 dereferenceable(32) ptr @"_ZNSt8functionIFvRK7__ns_rrEEaSIZN6Common13fetch_dns_txtENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorISC_SaISC_EEE3$_0EENSt9enable_ifIXsrNS4_9_CallableIT_NSI_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISK_E4typeEE4typeES4_EE5valueESt5decayISK_EE4type4typeESt15__invoke_resultIRSV_JS2_EEEE5valueERS4_E4typeEOSK_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: nounwind
declare i32 @ns_parserr(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEE5countERSA_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3mapI9__ns_typeSt8functionIFvRK7__ns_rrEESt4lessIS0_ESaISt4pairIKS0_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) 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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS9__ns_type", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !12, i64 1026}
!14 = !{!"_ZTS7__ns_rr", !7, i64 0, !12, i64 1026, !12, i64 1028, !15, i64 1032, !12, i64 1036, !6, i64 1040}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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