; LLVM IR from yellow-footed-honeyguide/facad :: src (emoji_utils)

; 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.EmojiMapEntry = type { ptr, ptr }
%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@emoji_not_exact_file_map_size = external constant i64, align 8
@emoji_not_exact_file_map = external constant [0 x %struct.EmojiMapEntry], align 8
@emoji_exact_file_map_size = external constant i64, align 8
@emoji_exact_file_map = external constant [0 x %struct.EmojiMapEntry], align 8
@emoji_extension_map_size = external constant i64, align 8
@emoji_extension_map = external constant [0 x %struct.EmojiMapEntry], align 8
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 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: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @safe_strdup(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @get_emoji(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %struct.stat, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 144, ptr %4) #4
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = call i32 @lstat(ptr noundef %12, ptr noundef %4) #4
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %1
  %16 = call ptr @safe_strdup(ptr noundef @.str.3)
  store ptr %16, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %166

17:                                               ; preds = %1
  %18 = getelementptr inbounds %struct.stat, ptr %4, i32 0, i32 3
  %19 = load i32, ptr %18, align 8, !tbaa !9
  %20 = and i32 %19, 61440
  %21 = icmp eq i32 %20, 40960
  br i1 %21, label %22, label %30

22:                                               ; preds = %17
  %23 = getelementptr inbounds %struct.stat, ptr %4, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = and i32 %24, 61440
  %26 = icmp eq i32 %25, 16384
  %27 = zext i1 %26 to i64
  %28 = select i1 %26, ptr @.str.4, ptr @.str.5
  %29 = call ptr @safe_strdup(ptr noundef %28)
  store ptr %29, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %166

30:                                               ; preds = %17
  %31 = getelementptr inbounds %struct.stat, ptr %4, i32 0, i32 3
  %32 = load i32, ptr %31, align 8, !tbaa !9
  %33 = and i32 %32, 61440
  %34 = icmp eq i32 %33, 16384
  br i1 %34, label %35, label %37

35:                                               ; preds = %30
  %36 = call ptr @safe_strdup(ptr noundef @.str.6)
  store ptr %36, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %166

37:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = call ptr @strrchr(ptr noundef %38, i32 noundef 47) #5
  store ptr %39, ptr %6, align 8, !tbaa !5
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %45

42:                                               ; preds = %37
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 1
  br label %47

45:                                               ; preds = %37
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %45, %42
  %48 = phi ptr [ %44, %42 ], [ %46, %45 ]
  store ptr %48, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !14
  br label %49

49:                                               ; preds = %69, %47
  %50 = load i64, ptr %7, align 8, !tbaa !14
  %51 = load i64, ptr @emoji_not_exact_file_map_size, align 8, !tbaa !14
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 2, ptr %5, align 4
  br label %72

54:                                               ; preds = %49
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load i64, ptr %7, align 8, !tbaa !14
  %57 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_not_exact_file_map, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.EmojiMapEntry, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !15
  %60 = call ptr @strstr(ptr noundef %55, ptr noundef %59) #5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %68

62:                                               ; preds = %54
  %63 = load i64, ptr %7, align 8, !tbaa !14
  %64 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_not_exact_file_map, i64 0, i64 %63
  %65 = getelementptr inbounds %struct.EmojiMapEntry, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  %67 = call ptr @safe_strdup(ptr noundef %66)
  store ptr %67, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %72

68:                                               ; preds = %54
  br label %69

69:                                               ; preds = %68
  %70 = load i64, ptr %7, align 8, !tbaa !14
  %71 = add i64 %70, 1
  store i64 %71, ptr %7, align 8, !tbaa !14
  br label %49, !llvm.loop !18

72:                                               ; preds = %62, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %73 = load i32, ptr %5, align 4
  switch i32 %73, label %165 [
    i32 2, label %74
  ]

74:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  store i64 0, ptr %8, align 8, !tbaa !14
  br label %75

75:                                               ; preds = %95, %74
  %76 = load i64, ptr %8, align 8, !tbaa !14
  %77 = load i64, ptr @emoji_exact_file_map_size, align 8, !tbaa !14
  %78 = icmp ult i64 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  store i32 5, ptr %5, align 4
  br label %98

80:                                               ; preds = %75
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i64, ptr %8, align 8, !tbaa !14
  %83 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_exact_file_map, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.EmojiMapEntry, ptr %83, i32 0, i32 0
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = call i32 @strcasecmp(ptr noundef %81, ptr noundef %85) #5
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %94

88:                                               ; preds = %80
  %89 = load i64, ptr %8, align 8, !tbaa !14
  %90 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_exact_file_map, i64 0, i64 %89
  %91 = getelementptr inbounds %struct.EmojiMapEntry, ptr %90, i32 0, i32 1
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = call ptr @safe_strdup(ptr noundef %92)
  store ptr %93, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %98

94:                                               ; preds = %80
  br label %95

95:                                               ; preds = %94
  %96 = load i64, ptr %8, align 8, !tbaa !14
  %97 = add i64 %96, 1
  store i64 %97, ptr %8, align 8, !tbaa !14
  br label %75, !llvm.loop !20

98:                                               ; preds = %88, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %99 = load i32, ptr %5, align 4
  switch i32 %99, label %165 [
    i32 5, label %100
  ]

100:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = call ptr @check_file_content(ptr noundef %101)
  store ptr %102, ptr %9, align 8, !tbaa !5
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %107

105:                                              ; preds = %100
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %106, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %164

107:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = call ptr @strrchr(ptr noundef %108, i32 noundef 46) #5
  store ptr %109, ptr %10, align 8, !tbaa !5
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %141

112:                                              ; preds = %107
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds i8, ptr %113, i32 1
  store ptr %114, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !14
  br label %115

115:                                              ; preds = %135, %112
  %116 = load i64, ptr %11, align 8, !tbaa !14
  %117 = load i64, ptr @emoji_extension_map_size, align 8, !tbaa !14
  %118 = icmp ult i64 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 8, ptr %5, align 4
  br label %138

120:                                              ; preds = %115
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = load i64, ptr %11, align 8, !tbaa !14
  %123 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_extension_map, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.EmojiMapEntry, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !15
  %126 = call i32 @strcasecmp(ptr noundef %121, ptr noundef %125) #5
  %127 = icmp eq i32 %126, 0
  br i1 %127, label %128, label %134

128:                                              ; preds = %120
  %129 = load i64, ptr %11, align 8, !tbaa !14
  %130 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_extension_map, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.EmojiMapEntry, ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !17
  %133 = call ptr @safe_strdup(ptr noundef %132)
  store ptr %133, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %138

134:                                              ; preds = %120
  br label %135

135:                                              ; preds = %134
  %136 = load i64, ptr %11, align 8, !tbaa !14
  %137 = add i64 %136, 1
  store i64 %137, ptr %11, align 8, !tbaa !14
  br label %115, !llvm.loop !21

138:                                              ; preds = %128, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %139 = load i32, ptr %5, align 4
  switch i32 %139, label %163 [
    i32 8, label %140
  ]

140:                                              ; preds = %138
  br label %141

141:                                              ; preds = %140, %107
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds i8, ptr %142, i64 0
  %144 = load i8, ptr %143, align 1, !tbaa !22
  %145 = sext i8 %144 to i32
  %146 = icmp eq i32 %145, 46
  br i1 %146, label %147, label %149

147:                                              ; preds = %141
  %148 = call ptr @safe_strdup(ptr noundef @.str.7)
  store ptr %148, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %163

149:                                              ; preds = %141
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = call i32 @is_executable(ptr noundef %150)
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %155

153:                                              ; preds = %149
  %154 = call ptr @safe_strdup(ptr noundef @.str.8)
  store ptr %154, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %163

155:                                              ; preds = %149
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = call i32 @is_text_file(ptr noundef %156)
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %161

159:                                              ; preds = %155
  %160 = call ptr @safe_strdup(ptr noundef @.str.9)
  store ptr %160, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %163

161:                                              ; preds = %155
  %162 = call ptr @safe_strdup(ptr noundef @.str.3)
  store ptr %162, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %163

163:                                              ; preds = %161, %159, %153, %147, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %164

164:                                              ; preds = %163, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %165

165:                                              ; preds = %164, %98, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %166

166:                                              ; preds = %165, %35, %22, %15
  call void @llvm.lifetime.end.p0(i64 144, ptr %4) #4
  %167 = load ptr, ptr %2, align 8
  ret ptr %167
}

; Function Attrs: nounwind
declare i32 @lstat(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strrchr(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcasecmp(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @check_file_content(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @is_executable(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @is_text_file(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "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 = { 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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, !12, i64 24}
!10 = !{!"stat", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !13, i64 72, !13, i64 88, !13, i64 104, !7, i64 120}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"timespec", !11, i64 0, !11, i64 8}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 8}
!17 = !{!16, !6, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = !{!7, !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.EmojiMapEntry = type { ptr, ptr }
%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@.str.3 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@emoji_not_exact_file_map_size = external local_unnamed_addr constant i64, align 8
@emoji_not_exact_file_map = external local_unnamed_addr constant [0 x %struct.EmojiMapEntry], align 8
@emoji_exact_file_map_size = external local_unnamed_addr constant i64, align 8
@emoji_exact_file_map = external local_unnamed_addr constant [0 x %struct.EmojiMapEntry], align 8
@emoji_extension_map_size = external local_unnamed_addr constant i64, align 8
@emoji_extension_map = external local_unnamed_addr constant [0 x %struct.EmojiMapEntry], align 8
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 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 nofree nounwind willreturn memory(argmem: read)
declare ptr @strstr(ptr noundef, ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @safe_strdup(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @get_emoji(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca %struct.stat, align 8
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %2) #5
  %3 = call i32 @lstat(ptr noundef %0, ptr noundef nonnull %2) #5
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %6, label %4

4:                                                ; preds = %1
  %5 = tail call ptr @safe_strdup(ptr noundef nonnull @.str.3)
  br label %66

6:                                                ; preds = %1
  %7 = getelementptr inbounds i8, ptr %2, i64 24
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %9 = trunc i32 %8 to i16
  %trunc = and i16 %9, -4096
  switch i16 %trunc, label %14 [
    i16 -24576, label %10
    i16 16384, label %12
  ]

10:                                               ; preds = %6
  %11 = tail call ptr @safe_strdup(ptr noundef nonnull @.str.5)
  br label %66

12:                                               ; preds = %6
  %13 = tail call ptr @safe_strdup(ptr noundef nonnull @.str.6)
  br label %66

14:                                               ; preds = %6
  %15 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %0, i32 noundef 47) #6
  %.not43 = icmp eq ptr %15, null
  %16 = getelementptr inbounds i8, ptr %15, i64 1
  %17 = select i1 %.not43, ptr %0, ptr %16
  %18 = load i64, ptr @emoji_not_exact_file_map_size, align 8, !tbaa !12
  %.not4559.not = icmp eq i64 %18, 0
  br i1 %.not4559.not, label %.preheader, label %.lr.ph

19:                                               ; preds = %.lr.ph
  %20 = add nuw i64 %.03660, 1
  %exitcond.not = icmp eq i64 %20, %18
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !13

.preheader:                                       ; preds = %19, %14
  %21 = load i64, ptr @emoji_exact_file_map_size, align 8, !tbaa !12
  %.not4661.not = icmp eq i64 %21, 0
  br i1 %.not4661.not, label %._crit_edge, label %.lr.ph63

.lr.ph:                                           ; preds = %14, %19
  %.03660 = phi i64 [ %20, %19 ], [ 0, %14 ]
  %22 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_not_exact_file_map, i64 0, i64 %.03660
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %17, ptr noundef nonnull dereferenceable(1) %23) #6
  %.not44 = icmp eq ptr %24, null
  br i1 %.not44, label %19, label %.thread

.thread:                                          ; preds = %.lr.ph
  %25 = getelementptr inbounds i8, ptr %22, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %27 = tail call ptr @safe_strdup(ptr noundef %26)
  br label %66

28:                                               ; preds = %.lr.ph63
  %29 = add nuw i64 %.03562, 1
  %exitcond73.not = icmp eq i64 %29, %21
  br i1 %exitcond73.not, label %._crit_edge, label %.lr.ph63, !llvm.loop !19

.lr.ph63:                                         ; preds = %.preheader, %28
  %.03562 = phi i64 [ %29, %28 ], [ 0, %.preheader ]
  %30 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_exact_file_map, i64 0, i64 %.03562
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  %32 = tail call i32 @strcasecmp(ptr noundef %17, ptr noundef %31) #6
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %.thread53, label %28

.thread53:                                        ; preds = %.lr.ph63
  %34 = getelementptr inbounds i8, ptr %30, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  %36 = tail call ptr @safe_strdup(ptr noundef %35)
  br label %66

._crit_edge:                                      ; preds = %28, %.preheader
  %37 = tail call ptr @check_file_content(ptr noundef %0)
  %.not47 = icmp eq ptr %37, null
  br i1 %.not47, label %38, label %66

38:                                               ; preds = %._crit_edge
  %39 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %17, i32 noundef 46) #6
  %.not48 = icmp eq ptr %39, null
  br i1 %.not48, label %.loopexit, label %40

40:                                               ; preds = %38
  %41 = getelementptr inbounds i8, ptr %39, i64 1
  %42 = load i64, ptr @emoji_extension_map_size, align 8, !tbaa !12
  %.not4964.not = icmp eq i64 %42, 0
  br i1 %.not4964.not, label %.loopexit, label %.lr.ph67

43:                                               ; preds = %.lr.ph67
  %44 = add nuw i64 %.065, 1
  %exitcond74.not = icmp eq i64 %44, %42
  br i1 %exitcond74.not, label %.loopexit, label %.lr.ph67, !llvm.loop !20

.lr.ph67:                                         ; preds = %40, %43
  %.065 = phi i64 [ %44, %43 ], [ 0, %40 ]
  %45 = getelementptr inbounds [0 x %struct.EmojiMapEntry], ptr @emoji_extension_map, i64 0, i64 %.065
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = tail call i32 @strcasecmp(ptr noundef nonnull %41, ptr noundef %46) #6
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %.thread55, label %43

.thread55:                                        ; preds = %.lr.ph67
  %49 = getelementptr inbounds i8, ptr %45, i64 8
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = tail call ptr @safe_strdup(ptr noundef %50)
  br label %66

.loopexit:                                        ; preds = %43, %40, %38
  %52 = load i8, ptr %17, align 1, !tbaa !21
  %53 = icmp eq i8 %52, 46
  br i1 %53, label %54, label %56

54:                                               ; preds = %.loopexit
  %55 = tail call ptr @safe_strdup(ptr noundef nonnull @.str.7)
  br label %66

56:                                               ; preds = %.loopexit
  %57 = tail call i32 @is_executable(ptr noundef %0)
  %.not50 = icmp eq i32 %57, 0
  br i1 %.not50, label %60, label %58

58:                                               ; preds = %56
  %59 = tail call ptr @safe_strdup(ptr noundef nonnull @.str.8)
  br label %66

60:                                               ; preds = %56
  %61 = tail call i32 @is_text_file(ptr noundef %0)
  %.not51 = icmp eq i32 %61, 0
  br i1 %.not51, label %64, label %62

62:                                               ; preds = %60
  %63 = tail call ptr @safe_strdup(ptr noundef nonnull @.str.9)
  br label %66

64:                                               ; preds = %60
  %65 = tail call ptr @safe_strdup(ptr noundef nonnull @.str.3)
  br label %66

66:                                               ; preds = %.thread55, %.thread53, %.thread, %54, %58, %62, %64, %._crit_edge, %12, %10, %4
  %.6 = phi ptr [ %5, %4 ], [ %11, %10 ], [ %13, %12 ], [ %37, %._crit_edge ], [ %55, %54 ], [ %59, %58 ], [ %63, %62 ], [ %65, %64 ], [ %27, %.thread ], [ %36, %.thread53 ], [ %51, %.thread55 ]
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %2) #5
  ret ptr %.6
}

; Function Attrs: nofree nounwind
declare noundef i32 @lstat(ptr nocapture noundef readonly, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i32 @strcasecmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden ptr @check_file_content(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @is_executable(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @is_text_file(ptr noundef) local_unnamed_addr #2

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

!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, !10, i64 24}
!6 = !{!"stat", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !11, i64 72, !11, i64 88, !11, i64 104, !8, i64 120}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"timespec", !7, i64 0, !7, i64 8}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !17, i64 0}
!16 = !{!"", !17, i64 0, !17, i64 8}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!16, !17, i64 8}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = !{!8, !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass