; LLVM IR from ros2/rcutils :: src (filesystem)

; 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.rcutils_allocator_s = type { ptr, ptr, ptr, ptr, ptr }
%struct.rcutils_dir_iter_s = type { ptr, %struct.rcutils_allocator_s, ptr }
%struct.rcutils_dir_iter_state_s = type { ptr }
%struct.dirent = type { i64, i64, i16, i8, [256 x i8] }

@stderr = external global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #1

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i32 @rcutils_snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #2

declare zeroext i1 @rcutils_allocator_is_valid(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @rcutils_dir_iter_start(ptr noundef %0, ptr noundef byval(%struct.rcutils_allocator_s) align 8 %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca [1024 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca [1024 x i8], align 16
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %2
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp eq ptr null, %13
  br i1 %14, label %15, label %18

15:                                               ; preds = %12
  br label %16

16:                                               ; preds = %15
  call void @rcutils_set_error_state(ptr noundef @.str.9, ptr noundef @.str.10, i64 noundef 412)
  br label %17

17:                                               ; preds = %16
  store ptr null, ptr %3, align 8
  br label %136

18:                                               ; preds = %12
  br label %19

19:                                               ; preds = %18
  %20 = call zeroext i1 @rcutils_allocator_is_valid(ptr noundef %1)
  br i1 %20, label %24, label %21

21:                                               ; preds = %19
  br label %22

22:                                               ; preds = %21
  call void @rcutils_set_error_state(ptr noundef @.str.11, ptr noundef @.str.10, i64 noundef 414)
  br label %23

23:                                               ; preds = %22
  store ptr null, ptr %3, align 8
  br label %136

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %25 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %1, i32 0, i32 3
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %1, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = call ptr %26(i64 noundef 1, i64 noundef 56, ptr noundef %28)
  store ptr %29, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = icmp eq ptr null, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %24
  store ptr null, ptr %3, align 8
  store i32 1, ptr %6, align 4
  br label %135

33:                                               ; preds = %24
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.rcutils_dir_iter_s, ptr %34, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %35, ptr align 8 %1, i64 40, i1 false), !tbaa.struct !12
  %36 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %1, i32 0, i32 3
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %1, i32 0, i32 4
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = call ptr %37(i64 noundef 1, i64 noundef 8, ptr noundef %39)
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.rcutils_dir_iter_s, ptr %41, i32 0, i32 2
  store ptr %40, ptr %42, align 8, !tbaa !13
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.rcutils_dir_iter_s, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = icmp eq ptr null, %45
  br i1 %46, label %47, label %51

47:                                               ; preds = %33
  br label %48

48:                                               ; preds = %47
  call void @rcutils_set_error_state(ptr noundef @.str.12, ptr noundef @.str.10, i64 noundef 427)
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  br label %133

51:                                               ; preds = %33
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = call ptr @opendir(ptr noundef %52)
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.rcutils_dir_iter_s, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %55, align 8, !tbaa !13
  %57 = getelementptr inbounds %struct.rcutils_dir_iter_state_s, ptr %56, i32 0, i32 0
  store ptr %53, ptr %57, align 8, !tbaa !15
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.rcutils_dir_iter_s, ptr %58, i32 0, i32 2
  %60 = load ptr, ptr %59, align 8, !tbaa !13
  %61 = getelementptr inbounds %struct.rcutils_dir_iter_state_s, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !15
  %63 = icmp eq ptr null, %62
  br i1 %63, label %64, label %87

64:                                               ; preds = %51
  br label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 1024, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %66 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 0
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = call ptr @__errno_location() #6
  %69 = load i32, ptr %68, align 4, !tbaa !17
  %70 = call i32 (ptr, i64, ptr, ...) @rcutils_snprintf(ptr noundef %66, i64 noundef 1024, ptr noundef @.str.13, ptr noundef %67, i32 noundef %69)
  store i32 %70, ptr %8, align 4, !tbaa !17
  %71 = load i32, ptr %8, align 4, !tbaa !17
  %72 = icmp slt i32 %71, 0
  br i1 %72, label %73, label %79

73:                                               ; preds = %65
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = call i64 @fwrite(ptr noundef @.str.6, i64 noundef 1, i64 noundef 53, ptr noundef %75)
  br label %77

77:                                               ; preds = %74
  br label %78

78:                                               ; preds = %77
  br label %84

79:                                               ; preds = %65
  br label %80

80:                                               ; preds = %79
  %81 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 0
  call void @rcutils_set_error_state(ptr noundef %81, ptr noundef @.str.10, i64 noundef 452)
  br label %82

82:                                               ; preds = %80
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %7) #5
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85
  br label %133

87:                                               ; preds = %51
  %88 = call ptr @__errno_location() #6
  store i32 0, ptr %88, align 4, !tbaa !17
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.rcutils_dir_iter_s, ptr %89, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = getelementptr inbounds %struct.rcutils_dir_iter_state_s, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  %94 = call ptr @readdir(ptr noundef %93)
  store ptr %94, ptr %9, align 8, !tbaa !5
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = icmp ne ptr null, %95
  br i1 %96, label %97, label %103

97:                                               ; preds = %87
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.dirent, ptr %98, i32 0, i32 4
  %100 = getelementptr inbounds [256 x i8], ptr %99, i64 0, i64 0
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.rcutils_dir_iter_s, ptr %101, i32 0, i32 0
  store ptr %100, ptr %102, align 8, !tbaa !19
  br label %131

103:                                              ; preds = %87
  %104 = call ptr @__errno_location() #6
  %105 = load i32, ptr %104, align 4, !tbaa !17
  %106 = icmp ne i32 0, %105
  br i1 %106, label %107, label %130

107:                                              ; preds = %103
  br label %108

108:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 1024, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %109 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = call ptr @__errno_location() #6
  %112 = load i32, ptr %111, align 4, !tbaa !17
  %113 = call i32 (ptr, i64, ptr, ...) @rcutils_snprintf(ptr noundef %109, i64 noundef 1024, ptr noundef @.str.14, ptr noundef %110, i32 noundef %112)
  store i32 %113, ptr %11, align 4, !tbaa !17
  %114 = load i32, ptr %11, align 4, !tbaa !17
  %115 = icmp slt i32 %114, 0
  br i1 %115, label %116, label %122

116:                                              ; preds = %108
  br label %117

117:                                              ; preds = %116
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = call i64 @fwrite(ptr noundef @.str.6, i64 noundef 1, i64 noundef 53, ptr noundef %118)
  br label %120

120:                                              ; preds = %117
  br label %121

121:                                              ; preds = %120
  br label %127

122:                                              ; preds = %108
  br label %123

123:                                              ; preds = %122
  %124 = getelementptr inbounds [1024 x i8], ptr %10, i64 0, i64 0
  call void @rcutils_set_error_state(ptr noundef %124, ptr noundef @.str.10, i64 noundef 462)
  br label %125

125:                                              ; preds = %123
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %10) #5
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  br label %133

130:                                              ; preds = %103
  br label %131

131:                                              ; preds = %130, %97
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %132, ptr %3, align 8
  store i32 1, ptr %6, align 4
  br label %135

133:                                              ; preds = %129, %86, %50
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  call void @rcutils_dir_iter_end(ptr noundef %134)
  store ptr null, ptr %3, align 8
  store i32 1, ptr %6, align 4
  br label %135

135:                                              ; preds = %133, %131, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %136

136:                                              ; preds = %135, %23, %17
  %137 = load ptr, ptr %3, align 8
  ret ptr %137
}

; Function Attrs: nounwind uwtable
declare dso_local void @rcutils_dir_iter_end(ptr noundef) #3

declare void @rcutils_set_error_state(ptr noundef, ptr noundef, i64 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare ptr @opendir(ptr noundef) #2

declare ptr @readdir(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(none) "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 = { "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 = { 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 nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(none) }

!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/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"rcutils_allocator_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!11 = !{!10, !6, i64 32}
!12 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5}
!13 = !{!14, !6, i64 48}
!14 = !{!"rcutils_dir_iter_s", !6, i64 0, !10, i64 8, !6, i64 48}
!15 = !{!16, !6, i64 0}
!16 = !{!"rcutils_dir_iter_state_s", !6, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!14, !6, 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.rcutils_allocator_s = type { ptr, ptr, ptr, ptr, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2

declare i32 @rcutils_snprintf(ptr noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #3

declare zeroext i1 @rcutils_allocator_is_valid(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local ptr @rcutils_dir_iter_start(ptr noundef %0, ptr noundef byval(%struct.rcutils_allocator_s) align 8 %1) local_unnamed_addr #4 {
  %3 = alloca [1024 x i8], align 16
  %4 = alloca [1024 x i8], align 16
  %5 = icmp eq ptr %0, null
  br i1 %5, label %6, label %7

6:                                                ; preds = %2
  tail call void @rcutils_set_error_state(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.10, i64 noundef 412) #6
  br label %55

7:                                                ; preds = %2
  %8 = call zeroext i1 @rcutils_allocator_is_valid(ptr noundef nonnull %1) #6
  br i1 %8, label %10, label %9

9:                                                ; preds = %7
  call void @rcutils_set_error_state(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.10, i64 noundef 414) #6
  br label %55

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %1, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %1, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !10
  %15 = call ptr %12(i64 noundef 1, i64 noundef 56, ptr noundef %14) #6
  %16 = icmp eq ptr %15, null
  br i1 %16, label %55, label %17

17:                                               ; preds = %10
  %18 = getelementptr inbounds i8, ptr %15, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 8 dereferenceable(40) %1, i64 40, i1 false), !tbaa.struct !11
  %19 = load ptr, ptr %11, align 8, !tbaa !5
  %20 = load ptr, ptr %13, align 8, !tbaa !10
  %21 = call ptr %19(i64 noundef 1, i64 noundef 8, ptr noundef %20) #6
  %22 = getelementptr inbounds i8, ptr %15, i64 48
  store ptr %21, ptr %22, align 8, !tbaa !13
  %23 = icmp eq ptr %21, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %17
  call void @rcutils_set_error_state(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.10, i64 noundef 427) #6
  br label %54

25:                                               ; preds = %17
  %26 = call ptr @opendir(ptr noundef nonnull %0)
  %27 = load ptr, ptr %22, align 8, !tbaa !13
  store ptr %26, ptr %27, align 8, !tbaa !15
  %28 = icmp eq ptr %26, null
  br i1 %28, label %29, label %39

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %3) #6
  %30 = tail call ptr @__errno_location() #7
  %31 = load i32, ptr %30, align 4, !tbaa !17
  %32 = call i32 (ptr, i64, ptr, ...) @rcutils_snprintf(ptr noundef nonnull %3, i64 noundef 1024, ptr noundef nonnull @.str.13, ptr noundef nonnull %0, i32 noundef %31) #6
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %34, label %37

34:                                               ; preds = %29
  %35 = load ptr, ptr @stderr, align 8, !tbaa !12
  %36 = call i64 @fwrite(ptr noundef nonnull @.str.6, i64 noundef 1, i64 noundef 53, ptr noundef %35) #8
  br label %38

37:                                               ; preds = %29
  call void @rcutils_set_error_state(ptr noundef nonnull %3, ptr noundef nonnull @.str.10, i64 noundef 452) #6
  br label %38

38:                                               ; preds = %37, %34
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %3) #6
  br label %54

39:                                               ; preds = %25
  %40 = tail call ptr @__errno_location() #7
  store i32 0, ptr %40, align 4, !tbaa !17
  %41 = call ptr @readdir(ptr noundef nonnull %26) #6
  %.not = icmp eq ptr %41, null
  br i1 %.not, label %44, label %42

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %41, i64 19
  store ptr %43, ptr %15, align 8, !tbaa !19
  br label %55

44:                                               ; preds = %39
  %45 = load i32, ptr %40, align 4, !tbaa !17
  %.not21 = icmp eq i32 %45, 0
  br i1 %.not21, label %55, label %46

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #6
  %47 = call i32 (ptr, i64, ptr, ...) @rcutils_snprintf(ptr noundef nonnull %4, i64 noundef 1024, ptr noundef nonnull @.str.14, ptr noundef nonnull %0, i32 noundef %45) #6
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %52

49:                                               ; preds = %46
  %50 = load ptr, ptr @stderr, align 8, !tbaa !12
  %51 = call i64 @fwrite(ptr noundef nonnull @.str.6, i64 noundef 1, i64 noundef 53, ptr noundef %50) #8
  br label %53

52:                                               ; preds = %46
  call void @rcutils_set_error_state(ptr noundef nonnull %4, ptr noundef nonnull @.str.10, i64 noundef 462) #6
  br label %53

53:                                               ; preds = %52, %49
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #6
  br label %54

54:                                               ; preds = %53, %38, %24
  call void @rcutils_dir_iter_end(ptr noundef nonnull %15)
  br label %55

55:                                               ; preds = %54, %10, %44, %42, %9, %6
  %.1 = phi ptr [ null, %6 ], [ null, %9 ], [ null, %54 ], [ null, %10 ], [ %15, %44 ], [ %15, %42 ]
  ret ptr %.1
}

; Function Attrs: nounwind uwtable
declare dso_local void @rcutils_dir_iter_end(ptr noundef) local_unnamed_addr #4

declare void @rcutils_set_error_state(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: nofree nounwind
declare noalias noundef ptr @opendir(ptr nocapture noundef readonly) local_unnamed_addr #2

declare ptr @readdir(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { nofree 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 #3 = { "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 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(none) }
attributes #8 = { cold }

!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, !7, i64 24}
!6 = !{!"rcutils_allocator_s", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 32}
!11 = !{i64 0, i64 8, !12, i64 8, i64 8, !12, i64 16, i64 8, !12, i64 24, i64 8, !12, i64 32, i64 8, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !7, i64 48}
!14 = !{!"rcutils_dir_iter_s", !7, i64 0, !6, i64 8, !7, i64 48}
!15 = !{!16, !7, i64 0}
!16 = !{!"rcutils_dir_iter_state_s", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!14, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass