; LLVM IR from facebook/redex :: libresource/ResourceTypes.ll (ZNK7android15ResTable_config14getBcp47LocaleEPcb)

; 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.android::ResTable_config" = type { i32, %union.anon, %union.anon.0, %union.anon.2, %union.anon.4, %union.anon.6, %union.anon.8, %union.anon.10, %union.anon.12, [4 x i8], [8 x i8], %union.anon.14, i8, [8 x i8] }
%union.anon = type { i32 }
%union.anon.0 = type { i32 }
%union.anon.2 = type { i32 }
%union.anon.4 = type { i32 }
%union.anon.6 = type { i32 }
%union.anon.8 = type { i32 }
%union.anon.10 = type { i32 }
%union.anon.12 = type { i32 }
%union.anon.14 = type { i32 }
%struct.anon.1 = type { [2 x i8], [2 x i8] }

@_ZN7androidL8kTagalogE = external hidden constant [2 x i8], align 1
@_ZZNK7android15ResTable_config14getBcp47LocaleEPcbE9NU_PREFIX = external hidden constant [7 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: 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) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7android15ResTable_config14unpackLanguageEPc(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7android15ResTable_config12unpackRegionEPc(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7android12areIdenticalEPKcS1_(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strnlen(ptr noundef, i64 noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7android15ResTable_config14getBcp47LocaleEPcb(ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef %1, i1 noundef zeroext %2) #6 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %8 = zext i1 %2 to i8
  store i8 %8, ptr %6, align 1, !tbaa !9
  %9 = load ptr, ptr %4, align 8
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 1 %10, i8 0, i64 40, i1 false)
  %11 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 2
  %12 = getelementptr inbounds %struct.anon.1, ptr %11, i32 0, i32 0
  %13 = getelementptr inbounds [2 x i8], ptr %12, i64 0, i64 0
  %14 = load i8, ptr %13, align 4, !tbaa !11
  %15 = sext i8 %14 to i32
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %17, label %25

17:                                               ; preds = %3
  %18 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 2
  %19 = getelementptr inbounds %struct.anon.1, ptr %18, i32 0, i32 1
  %20 = getelementptr inbounds [2 x i8], ptr %19, i64 0, i64 0
  %21 = load i8, ptr %20, align 2, !tbaa !11
  %22 = sext i8 %21 to i32
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %17
  br label %152

25:                                               ; preds = %17, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store i64 0, ptr %7, align 8, !tbaa !12
  %26 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 2
  %27 = getelementptr inbounds %struct.anon.1, ptr %26, i32 0, i32 0
  %28 = getelementptr inbounds [2 x i8], ptr %27, i64 0, i64 0
  %29 = load i8, ptr %28, align 4, !tbaa !11
  %30 = sext i8 %29 to i32
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %57

32:                                               ; preds = %25
  %33 = load i8, ptr %6, align 1, !tbaa !9, !range !14, !noundef !15
  %34 = trunc i8 %33 to i1
  br i1 %34, label %35, label %51

35:                                               ; preds = %32
  %36 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 2
  %37 = getelementptr inbounds %struct.anon.1, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds [2 x i8], ptr %37, i64 0, i64 0
  %39 = call noundef zeroext i1 @_ZN7android12areIdenticalEPKcS1_(ptr noundef %38, ptr noundef @_ZN7androidL8kTagalogE)
  br i1 %39, label %40, label %51

40:                                               ; preds = %35
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 0
  store i8 102, ptr %42, align 1, !tbaa !11
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 1
  store i8 105, ptr %44, align 1, !tbaa !11
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 2
  store i8 108, ptr %46, align 1, !tbaa !11
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 3
  store i8 0, ptr %48, align 1, !tbaa !11
  %49 = load i64, ptr %7, align 8, !tbaa !12
  %50 = add i64 %49, 3
  store i64 %50, ptr %7, align 8, !tbaa !12
  br label %56

51:                                               ; preds = %35, %32
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call noundef i64 @_ZNK7android15ResTable_config14unpackLanguageEPc(ptr noundef nonnull align 4 dereferenceable(64) %9, ptr noundef %52)
  %54 = load i64, ptr %7, align 8, !tbaa !12
  %55 = add i64 %54, %53
  store i64 %55, ptr %7, align 8, !tbaa !12
  br label %56

56:                                               ; preds = %51, %40
  br label %57

57:                                               ; preds = %56, %25
  %58 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 9
  %59 = getelementptr inbounds [4 x i8], ptr %58, i64 0, i64 0
  %60 = load i8, ptr %59, align 4, !tbaa !11
  %61 = sext i8 %60 to i32
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %83

63:                                               ; preds = %57
  %64 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 12
  %65 = load i8, ptr %64, align 4, !tbaa !16, !range !14, !noundef !15
  %66 = trunc i8 %65 to i1
  br i1 %66, label %83, label %67

67:                                               ; preds = %63
  %68 = load i64, ptr %7, align 8, !tbaa !12
  %69 = icmp ugt i64 %68, 0
  br i1 %69, label %70, label %75

70:                                               ; preds = %67
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = load i64, ptr %7, align 8, !tbaa !12
  %73 = add i64 %72, 1
  store i64 %73, ptr %7, align 8, !tbaa !12
  %74 = getelementptr inbounds i8, ptr %71, i64 %72
  store i8 45, ptr %74, align 1, !tbaa !11
  br label %75

75:                                               ; preds = %70, %67
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load i64, ptr %7, align 8, !tbaa !12
  %78 = getelementptr inbounds i8, ptr %76, i64 %77
  %79 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 9
  %80 = getelementptr inbounds [4 x i8], ptr %79, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %78, ptr align 4 %80, i64 4, i1 false)
  %81 = load i64, ptr %7, align 8, !tbaa !12
  %82 = add i64 %81, 4
  store i64 %82, ptr %7, align 8, !tbaa !12
  br label %83

83:                                               ; preds = %75, %63, %57
  %84 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 2
  %85 = getelementptr inbounds %struct.anon.1, ptr %84, i32 0, i32 1
  %86 = getelementptr inbounds [2 x i8], ptr %85, i64 0, i64 0
  %87 = load i8, ptr %86, align 2, !tbaa !11
  %88 = sext i8 %87 to i32
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %105

90:                                               ; preds = %83
  %91 = load i64, ptr %7, align 8, !tbaa !12
  %92 = icmp ugt i64 %91, 0
  br i1 %92, label %93, label %98

93:                                               ; preds = %90
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load i64, ptr %7, align 8, !tbaa !12
  %96 = add i64 %95, 1
  store i64 %96, ptr %7, align 8, !tbaa !12
  %97 = getelementptr inbounds i8, ptr %94, i64 %95
  store i8 45, ptr %97, align 1, !tbaa !11
  br label %98

98:                                               ; preds = %93, %90
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = load i64, ptr %7, align 8, !tbaa !12
  %101 = getelementptr inbounds i8, ptr %99, i64 %100
  %102 = call noundef i64 @_ZNK7android15ResTable_config12unpackRegionEPc(ptr noundef nonnull align 4 dereferenceable(64) %9, ptr noundef %101)
  %103 = load i64, ptr %7, align 8, !tbaa !12
  %104 = add i64 %103, %102
  store i64 %104, ptr %7, align 8, !tbaa !12
  br label %105

105:                                              ; preds = %98, %83
  %106 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 10
  %107 = getelementptr inbounds [8 x i8], ptr %106, i64 0, i64 0
  %108 = load i8, ptr %107, align 4, !tbaa !11
  %109 = sext i8 %108 to i32
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %131

111:                                              ; preds = %105
  %112 = load i64, ptr %7, align 8, !tbaa !12
  %113 = icmp ugt i64 %112, 0
  br i1 %113, label %114, label %119

114:                                              ; preds = %111
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = load i64, ptr %7, align 8, !tbaa !12
  %117 = add i64 %116, 1
  store i64 %117, ptr %7, align 8, !tbaa !12
  %118 = getelementptr inbounds i8, ptr %115, i64 %116
  store i8 45, ptr %118, align 1, !tbaa !11
  br label %119

119:                                              ; preds = %114, %111
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load i64, ptr %7, align 8, !tbaa !12
  %122 = getelementptr inbounds i8, ptr %120, i64 %121
  %123 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 10
  %124 = getelementptr inbounds [8 x i8], ptr %123, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %122, ptr align 4 %124, i64 8, i1 false)
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = load i64, ptr %7, align 8, !tbaa !12
  %127 = getelementptr inbounds i8, ptr %125, i64 %126
  %128 = call i64 @strnlen(ptr noundef %127, i64 noundef 8) #8
  %129 = load i64, ptr %7, align 8, !tbaa !12
  %130 = add i64 %129, %128
  store i64 %130, ptr %7, align 8, !tbaa !12
  br label %131

131:                                              ; preds = %119, %105
  %132 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 13
  %133 = getelementptr inbounds [8 x i8], ptr %132, i64 0, i64 0
  %134 = load i8, ptr %133, align 1, !tbaa !11
  %135 = sext i8 %134 to i32
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %151

137:                                              ; preds = %131
  %138 = load i64, ptr %7, align 8, !tbaa !12
  %139 = icmp ugt i64 %138, 0
  br i1 %139, label %140, label %151

140:                                              ; preds = %137
  %141 = load ptr, ptr %5, align 8, !tbaa !5
  %142 = load i64, ptr %7, align 8, !tbaa !12
  %143 = getelementptr inbounds i8, ptr %141, i64 %142
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %143, ptr align 1 @_ZZNK7android15ResTable_config14getBcp47LocaleEPcbE9NU_PREFIX, i64 6, i1 false)
  %144 = load i64, ptr %7, align 8, !tbaa !12
  %145 = add i64 %144, 6
  store i64 %145, ptr %7, align 8, !tbaa !12
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = load i64, ptr %7, align 8, !tbaa !12
  %148 = getelementptr inbounds i8, ptr %146, i64 %147
  %149 = getelementptr inbounds %"struct.android::ResTable_config", ptr %9, i32 0, i32 13
  %150 = getelementptr inbounds [8 x i8], ptr %149, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %148, ptr align 1 %150, i64 8, i1 false)
  br label %151

151:                                              ; preds = %140, %137, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %152

152:                                              ; preds = %151, %24
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !10, i64 52}
!17 = !{!"_ZTSN7android15ResTable_configE", !18, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 48, !10, i64 52, !7, i64 53}
!18 = !{!"int", !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"

@_ZN7androidL8kTagalogE = external hidden constant [2 x i8], align 1
@_ZZNK7android15ResTable_config14getBcp47LocaleEPcbE9NU_PREFIX = external hidden local_unnamed_addr constant [7 x i8], align 1

; 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) #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7android15ResTable_config14unpackLanguageEPc(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7android15ResTable_config12unpackRegionEPc(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7android12areIdenticalEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK7android15ResTable_config14getBcp47LocaleEPcb(ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #2 align 2 {
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(40) %1, i8 0, i64 40, i1 false)
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i8, ptr %4, align 4, !tbaa !5
  %6 = icmp eq i8 %5, 0
  %7 = getelementptr inbounds i8, ptr %0, i64 10
  %8 = load i8, ptr %7, align 2
  %9 = icmp eq i8 %8, 0
  %or.cond44 = select i1 %6, i1 %9, i1 false
  br i1 %or.cond44, label %63, label %10

10:                                               ; preds = %3
  br i1 %6, label %17, label %11

11:                                               ; preds = %10
  br i1 %2, label %12, label %15

12:                                               ; preds = %11
  %13 = tail call noundef zeroext i1 @_ZN7android12areIdenticalEPKcS1_(ptr noundef nonnull %4, ptr noundef nonnull @_ZN7androidL8kTagalogE)
  br i1 %13, label %14, label %15

14:                                               ; preds = %12
  store <4 x i8> <i8 102, i8 105, i8 108, i8 0>, ptr %1, align 1, !tbaa !5
  br label %17

15:                                               ; preds = %12, %11
  %16 = tail call noundef i64 @_ZNK7android15ResTable_config14unpackLanguageEPc(ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef nonnull %1)
  br label %17

17:                                               ; preds = %14, %15, %10
  %.0 = phi i64 [ 3, %14 ], [ %16, %15 ], [ 0, %10 ]
  %18 = getelementptr inbounds i8, ptr %0, i64 36
  %19 = load i8, ptr %18, align 4, !tbaa !5
  %.not36 = icmp eq i8 %19, 0
  br i1 %.not36, label %32, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 52
  %22 = load i8, ptr %21, align 4, !tbaa !8, !range !12, !noundef !13
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %32, label %24

24:                                               ; preds = %20
  %.not37 = icmp eq i64 %.0, 0
  br i1 %.not37, label %28, label %25

25:                                               ; preds = %24
  %26 = add i64 %.0, 1
  %27 = getelementptr inbounds i8, ptr %1, i64 %.0
  store i8 45, ptr %27, align 1, !tbaa !5
  br label %28

28:                                               ; preds = %25, %24
  %.1 = phi i64 [ %26, %25 ], [ 0, %24 ]
  %29 = getelementptr inbounds i8, ptr %1, i64 %.1
  %30 = load i32, ptr %18, align 4
  store i32 %30, ptr %29, align 1
  %31 = add i64 %.1, 4
  br label %32

32:                                               ; preds = %28, %20, %17
  %.2 = phi i64 [ %.0, %20 ], [ %31, %28 ], [ %.0, %17 ]
  %33 = load i8, ptr %7, align 2, !tbaa !5
  %.not38 = icmp eq i8 %33, 0
  br i1 %.not38, label %42, label %34

34:                                               ; preds = %32
  %.not39 = icmp eq i64 %.2, 0
  br i1 %.not39, label %38, label %35

35:                                               ; preds = %34
  %36 = add i64 %.2, 1
  %37 = getelementptr inbounds i8, ptr %1, i64 %.2
  store i8 45, ptr %37, align 1, !tbaa !5
  br label %38

38:                                               ; preds = %35, %34
  %.3 = phi i64 [ %36, %35 ], [ 0, %34 ]
  %39 = getelementptr inbounds i8, ptr %1, i64 %.3
  %40 = tail call noundef i64 @_ZNK7android15ResTable_config12unpackRegionEPc(ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef %39)
  %41 = add i64 %40, %.3
  br label %42

42:                                               ; preds = %38, %32
  %.4 = phi i64 [ %41, %38 ], [ %.2, %32 ]
  %43 = getelementptr inbounds i8, ptr %0, i64 40
  %44 = load i8, ptr %43, align 4, !tbaa !5
  %.not40 = icmp eq i8 %44, 0
  br i1 %.not40, label %54, label %45

45:                                               ; preds = %42
  %.not41 = icmp eq i64 %.4, 0
  br i1 %.not41, label %49, label %46

46:                                               ; preds = %45
  %47 = add i64 %.4, 1
  %48 = getelementptr inbounds i8, ptr %1, i64 %.4
  store i8 45, ptr %48, align 1, !tbaa !5
  br label %49

49:                                               ; preds = %46, %45
  %.5 = phi i64 [ %47, %46 ], [ 0, %45 ]
  %50 = getelementptr inbounds i8, ptr %1, i64 %.5
  %51 = load i64, ptr %43, align 4
  store i64 %51, ptr %50, align 1
  %52 = tail call i64 @strnlen(ptr noundef nonnull dereferenceable(1) %50, i64 noundef 8) #5
  %53 = add i64 %52, %.5
  br label %54

54:                                               ; preds = %49, %42
  %.6 = phi i64 [ %53, %49 ], [ %.4, %42 ]
  %55 = getelementptr inbounds i8, ptr %0, i64 53
  %56 = load i8, ptr %55, align 1, !tbaa !5
  %57 = icmp ne i8 %56, 0
  %58 = icmp ne i64 %.6, 0
  %or.cond = select i1 %57, i1 %58, i1 false
  br i1 %or.cond, label %59, label %63

59:                                               ; preds = %54
  %60 = getelementptr inbounds i8, ptr %1, i64 %.6
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(6) %60, ptr noundef nonnull align 1 dereferenceable(6) @_ZZNK7android15ResTable_config14getBcp47LocaleEPcbE9NU_PREFIX, i64 6, i1 false)
  %61 = getelementptr i8, ptr %60, i64 6
  %62 = load i64, ptr %55, align 1
  store i64 %62, ptr %61, align 1
  br label %63

63:                                               ; preds = %54, %59, %3
  ret void
}

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 52}
!9 = !{!"_ZTSN7android15ResTable_configE", !10, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 48, !11, i64 52, !6, i64 53}
!10 = !{!"int", !6, i64 0}
!11 = !{!"bool", !6, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass