How can I avoid my passes to run on functions which were not originally defined in the source file?

I want to run a pass on a C++ code like this one:

#include<iostream>

int main(){
int a = 5;
int b = 6;
std::cout << a;
}

This code just defines a single function: main. But when I generate llvm-ir for this function it looks something like this:

%"class.std::ios_base::Init" = type { i8 }
%"class.std::basic_ostream" = type { i32 (...)**, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", %"class.std::basic_ostream"*, i8, i8, %"class.std::basic_streambuf"*, %"class.std::ctype"*, %"class.std::num_put"*, %"class.std::num_get"* }
%"class.std::ios_base" = type { i32 (...)**, i64, i64, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, %"struct.std::ios_base::_Words"*, %"class.std::locale" }
%"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"class.std::ios_base"*, i32)*, i32, i32 }
%"struct.std::ios_base::_Words" = type { i8*, i64 }
%"class.std::locale" = type { %"class.std::locale::_Impl"* }
%"class.std::locale::_Impl" = type { i32, %"class.std::locale::facet"**, i64, %"class.std::locale::facet"**, i8** }
%"class.std::locale::facet" = type <{ i32 (...)**, i32, [4 x i8] }>
%"class.std::basic_streambuf" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %"class.std::locale" }
%"class.std::ctype" = type <{ %"class.std::locale::facet.base", [4 x i8], %struct.__locale_struct*, i8, [7 x i8], i32*, i32*, i16*, i8, [256 x i8], [256 x i8], i8, [6 x i8] }>
%"class.std::locale::facet.base" = type <{ i32 (...)**, i32 }>
%struct.__locale_struct = type { [13 x %struct.__locale_data*], i16*, i32*, i32*, [13 x i8*] }
%struct.__locale_data = type opaque
%"class.std::num_put" = type { %"class.std::locale::facet.base", [4 x i8] }
%"class.std::num_get" = type { %"class.std::locale::facet.base", [4 x i8] }

@std::__ioinit = internal global %"class.std::ios_base::Init" zeroinitializer, align 1, !dbg !0
@__dso_handle = external hidden global i8
@std::cout = external dso_local global %"class.std::basic_ostream", align 8
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_example.cpp, i8* null }]

; Function Attrs: noinline
define internal void @__cxx_global_var_init() #0 section ".text.startup" !dbg !853 {
  call void @std::ios_base::Init::Init()(%"class.std::ios_base::Init"* nonnull align 1 dereferenceable(1) @std::__ioinit), !dbg !854
  %1 = call i32 @__cxa_atexit(void (i8*)* bitcast (void (%"class.std::ios_base::Init"*)* @std::ios_base::Init::~Init() to void (i8*)*), i8* getelementptr inbounds (%"class.std::ios_base::Init", %"class.std::ios_base::Init"* @std::__ioinit, i32 0, i32 0), i8* @__dso_handle) #3, !dbg !856
  ret void, !dbg !854
}

declare dso_local void @std::ios_base::Init::Init()(%"class.std::ios_base::Init"* nonnull align 1 dereferenceable(1)) unnamed_addr #1

; Function Attrs: nounwind
declare dso_local void @std::ios_base::Init::~Init()(%"class.std::ios_base::Init"* nonnull align 1 dereferenceable(1)) unnamed_addr #2

; Function Attrs: nounwind
declare dso_local i32 @__cxa_atexit(void (i8*)*, i8*, i8*) #3

; Function Attrs: mustprogress noinline norecurse optnone
define dso_local signext i32 @main() #4 !dbg !857 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  call void @llvm.dbg.declare(metadata i32* %1, metadata !858, metadata !DIExpression()), !dbg !859
  store i32 5, i32* %1, align 4, !dbg !859
  call void @llvm.dbg.declare(metadata i32* %2, metadata !860, metadata !DIExpression()), !dbg !861
  store i32 6, i32* %2, align 4, !dbg !861
  %3 = load i32, i32* %1, align 4, !dbg !862
  %4 = call nonnull align 8 dereferenceable(8) %"class.std::basic_ostream"* @std::basic_ostream<char, std::char_traits<char> >::operator<<(int)(%"class.std::basic_ostream"* nonnull align 8 dereferenceable(8) @std::cout, i32 signext %3), !dbg !863
  ret i32 0, !dbg !864
}

; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
declare void @llvm.dbg.declare(metadata, metadata, metadata) #5

declare dso_local nonnull align 8 dereferenceable(8) %"class.std::basic_ostream"* @std::basic_ostream<char, std::char_traits<char> >::operator<<(int)(%"class.std::basic_ostream"* nonnull align 8 dereferenceable(8), i32 signext) #1

; Function Attrs: noinline
define internal void @_GLOBAL__sub_I_example.cpp() #0 section ".text.startup" !dbg !865 {
  call void @__cxx_global_var_init(), !dbg !867
  ret void
}

attributes #0 = { noinline "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit,+a,+c,+d,+f,+m,+relax,-save-restore" }
attributes #1 = { "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit,+a,+c,+d,+f,+m,+relax,-save-restore" }
attributes #2 = { nounwind "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit,+a,+c,+d,+f,+m,+relax,-save-restore" }
attributes #3 = { nounwind }
attributes #4 = { mustprogress noinline norecurse optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit,+a,+c,+d,+f,+m,+relax,-save-restore" }
attributes #5 = { nofree nosync nounwind readnone speculatable willreturn }

It can be seen that this llvm-ir also has some ‘other’ function defined in it such as: @_GLOBAL__sub_I_example.cpp() and @__cxx_global_var_init().
Both of these functions weren’t defined in the original C++ code and I don’t want to run my pass on such functions (functions not originally defined in the C++ source file).

How can I avoid my passes to run on functions which were not originally defined in the source file?

Thanks.