; LLVM IR from openssl/openssl :: crypto/hpke (hpke_util)

; 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.synonymttab_t = type { i16, [4 x ptr] }
%struct.OSSL_HPKE_SUITE = type { i16, i16, i16 }

@.str = external hidden unnamed_addr constant [73 x i8], align 1
@__func__.ossl_hpke_str2suite = external hidden unnamed_addr constant [20 x i8], align 1
@kemstrtab = external hidden constant [5 x %struct.synonymttab_t], align 16
@kdfstrtab = external hidden constant [3 x %struct.synonymttab_t], align 16
@aeadstrtab = external hidden constant [4 x %struct.synonymttab_t], align 16

; 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

declare void @ERR_new() #1

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) #1

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) #1

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_hpke_str2suite(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i16, align 2
  %7 = alloca i16, align 2
  %8 = alloca i16, align 2
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #4
  store i16 0, ptr %6, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %7) #4
  store i16 0, ptr %7, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #4
  store i16 0, ptr %8, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !11
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %28, label %19

19:                                               ; preds = %2
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 0
  %22 = load i8, ptr %21, align 1, !tbaa !13
  %23 = sext i8 %22 to i32
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %28, label %25

25:                                               ; preds = %19
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %25, %19, %2
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 460, ptr noundef @__func__.ossl_hpke_str2suite)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 15, i32 noundef 786690, ptr noundef null)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %154

29:                                               ; preds = %25
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call i64 @OPENSSL_strnlen(ptr noundef %30, i64 noundef 38)
  store i64 %31, ptr %11, align 8, !tbaa !14
  %32 = load i64, ptr %11, align 8, !tbaa !14
  %33 = icmp uge i64 %32, 38
  br i1 %33, label %34, label %35

34:                                               ; preds = %29
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 465, ptr noundef @__func__.ossl_hpke_str2suite)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 15, i32 noundef 524550, ptr noundef null)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %154

35:                                               ; preds = %29
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = load i64, ptr %11, align 8, !tbaa !14
  %38 = sub i64 %37, 1
  %39 = getelementptr inbounds i8, ptr %36, i64 %38
  %40 = load i8, ptr %39, align 1, !tbaa !13
  %41 = sext i8 %40 to i32
  %42 = icmp eq i32 %41, 44
  br i1 %42, label %43, label %44

43:                                               ; preds = %35
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %154

44:                                               ; preds = %35
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %45, ptr %9, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %60, %44
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = load i8, ptr %47, align 1, !tbaa !13
  %49 = sext i8 %48 to i32
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %63

51:                                               ; preds = %46
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = load i8, ptr %52, align 1, !tbaa !13
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 44
  br i1 %55, label %56, label %59

56:                                               ; preds = %51
  %57 = load i32, ptr %14, align 4, !tbaa !11
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %14, align 4, !tbaa !11
  br label %59

59:                                               ; preds = %56, %51
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = getelementptr inbounds i8, ptr %61, i32 1
  store ptr %62, ptr %9, align 8, !tbaa !5
  br label %46, !llvm.loop !16

63:                                               ; preds = %46
  %64 = load i32, ptr %14, align 4, !tbaa !11
  %65 = icmp ne i32 %64, 2
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %154

67:                                               ; preds = %63
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load i64, ptr %11, align 8, !tbaa !14
  %70 = add i64 %69, 1
  %71 = call ptr @CRYPTO_memdup(ptr noundef %68, i64 noundef %70, ptr noundef @.str, i32 noundef 484)
  store ptr %71, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = icmp eq ptr %72, null
  br i1 %73, label %74, label %75

74:                                               ; preds = %67
  br label %151

75:                                               ; preds = %67
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %76, ptr %9, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %133, %75
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %83

80:                                               ; preds = %77
  %81 = load i32, ptr %12, align 4, !tbaa !11
  %82 = icmp slt i32 %81, 3
  br label %83

83:                                               ; preds = %80, %77
  %84 = phi i1 [ false, %77 ], [ %82, %80 ]
  br i1 %84, label %85, label %134

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = call ptr @strchr(ptr noundef %86, i32 noundef 44) #5
  store ptr %87, ptr %16, align 8, !tbaa !5
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %92

90:                                               ; preds = %85
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  store i8 0, ptr %91, align 1, !tbaa !13
  br label %92

92:                                               ; preds = %90, %85
  %93 = load i32, ptr %12, align 4, !tbaa !11
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %101

95:                                               ; preds = %92
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = call zeroext i16 @synonyms_name2id(ptr noundef %96, ptr noundef @kemstrtab, i64 noundef 5)
  store i16 %97, ptr %6, align 2, !tbaa !9
  %98 = zext i16 %97 to i32
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %100, label %101

100:                                              ; preds = %95
  store i32 5, ptr %15, align 4
  br label %131

101:                                              ; preds = %95, %92
  %102 = load i32, ptr %12, align 4, !tbaa !11
  %103 = icmp eq i32 %102, 1
  br i1 %103, label %104, label %110

104:                                              ; preds = %101
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = call zeroext i16 @synonyms_name2id(ptr noundef %105, ptr noundef @kdfstrtab, i64 noundef 3)
  store i16 %106, ptr %7, align 2, !tbaa !9
  %107 = zext i16 %106 to i32
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %110

109:                                              ; preds = %104
  store i32 5, ptr %15, align 4
  br label %131

110:                                              ; preds = %104, %101
  %111 = load i32, ptr %12, align 4, !tbaa !11
  %112 = icmp eq i32 %111, 2
  br i1 %112, label %113, label %119

113:                                              ; preds = %110
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = call zeroext i16 @synonyms_name2id(ptr noundef %114, ptr noundef @aeadstrtab, i64 noundef 4)
  store i16 %115, ptr %8, align 2, !tbaa !9
  %116 = zext i16 %115 to i32
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %119

118:                                              ; preds = %113
  store i32 5, ptr %15, align 4
  br label %131

119:                                              ; preds = %113, %110
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %16, align 8, !tbaa !5
  %123 = icmp eq ptr %122, null
  br i1 %123, label %124, label %125

124:                                              ; preds = %121
  store ptr null, ptr %9, align 8, !tbaa !5
  br label %128

125:                                              ; preds = %121
  %126 = load ptr, ptr %16, align 8, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %126, i64 1
  store ptr %127, ptr %9, align 8, !tbaa !5
  br label %128

128:                                              ; preds = %125, %124
  %129 = load i32, ptr %12, align 4, !tbaa !11
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %12, align 4, !tbaa !11
  store i32 0, ptr %15, align 4
  br label %131

131:                                              ; preds = %128, %118, %109, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %132 = load i32, ptr %15, align 4
  switch i32 %132, label %154 [
    i32 0, label %133
    i32 5, label %151
  ]

133:                                              ; preds = %131
  br label %77, !llvm.loop !18

134:                                              ; preds = %83
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = icmp ne ptr %135, null
  br i1 %136, label %140, label %137

137:                                              ; preds = %134
  %138 = load i32, ptr %12, align 4, !tbaa !11
  %139 = icmp ne i32 %138, 3
  br i1 %139, label %140, label %141

140:                                              ; preds = %137, %134
  br label %151

141:                                              ; preds = %137
  %142 = load i16, ptr %6, align 2, !tbaa !9
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.OSSL_HPKE_SUITE, ptr %143, i32 0, i32 0
  store i16 %142, ptr %144, align 2, !tbaa !19
  %145 = load i16, ptr %7, align 2, !tbaa !9
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.OSSL_HPKE_SUITE, ptr %146, i32 0, i32 1
  store i16 %145, ptr %147, align 2, !tbaa !21
  %148 = load i16, ptr %8, align 2, !tbaa !9
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.OSSL_HPKE_SUITE, ptr %149, i32 0, i32 2
  store i16 %148, ptr %150, align 2, !tbaa !22
  store i32 1, ptr %13, align 4, !tbaa !11
  br label %151

151:                                              ; preds = %141, %140, %131, %74
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %152, ptr noundef @.str, i32 noundef 526)
  %153 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %153, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %154

154:                                              ; preds = %151, %131, %66, %43, %34, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #4
  %155 = load i32, ptr %3, align 4
  ret i32 %155
}

declare i64 @OPENSSL_strnlen(ptr noundef, i64 noundef) #1

declare ptr @CRYPTO_memdup(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @synonyms_name2id(ptr noundef, ptr noundef, i64 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 #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, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!20, !10, i64 0}
!20 = !{!"", !10, i64 0, !10, i64 2, !10, i64 4}
!21 = !{!20, !10, i64 2}
!22 = !{!20, !10, i64 4}


; 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.synonymttab_t = type { i16, [4 x ptr] }

@.str = external hidden unnamed_addr constant [73 x i8], align 1
@__func__.ossl_hpke_str2suite = external hidden unnamed_addr constant [20 x i8], align 1
@kemstrtab = external hidden constant [5 x %struct.synonymttab_t], align 16
@kdfstrtab = external hidden constant [3 x %struct.synonymttab_t], align 16
@aeadstrtab = external hidden constant [4 x %struct.synonymttab_t], align 16

declare void @ERR_new() local_unnamed_addr #0

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

declare void @CRYPTO_free(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @ossl_hpke_str2suite(ptr noundef %0, ptr noundef writeonly %1) local_unnamed_addr #1 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %8, label %4

4:                                                ; preds = %2
  %5 = load i8, ptr %0, align 1, !tbaa !5
  %6 = icmp eq i8 %5, 0
  %7 = icmp eq ptr %1, null
  %or.cond = or i1 %7, %6
  br i1 %or.cond, label %8, label %9

8:                                                ; preds = %4, %2
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 460, ptr noundef nonnull @__func__.ossl_hpke_str2suite) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 15, i32 noundef 786690, ptr noundef null) #3
  br label %48

9:                                                ; preds = %4
  %10 = tail call i64 @OPENSSL_strnlen(ptr noundef nonnull %0, i64 noundef 38) #3
  %11 = icmp ugt i64 %10, 37
  br i1 %11, label %12, label %13

12:                                               ; preds = %9
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 465, ptr noundef nonnull @__func__.ossl_hpke_str2suite) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 15, i32 noundef 524550, ptr noundef null) #3
  br label %48

13:                                               ; preds = %9
  %14 = getelementptr i8, ptr %0, i64 %10
  %15 = getelementptr i8, ptr %14, i64 -1
  %16 = load i8, ptr %15, align 1, !tbaa !5
  %17 = icmp eq i8 %16, 44
  br i1 %17, label %48, label %.preheader85

.preheader85:                                     ; preds = %13, %21
  %.052 = phi ptr [ %22, %21 ], [ %0, %13 ]
  %.046 = phi i32 [ %.1, %21 ], [ 0, %13 ]
  %18 = load i8, ptr %.052, align 1, !tbaa !5
  switch i8 %18, label %21 [
    i8 0, label %23
    i8 44, label %19
  ]

19:                                               ; preds = %.preheader85
  %20 = add nsw i32 %.046, 1
  br label %21

21:                                               ; preds = %.preheader85, %19
  %.1 = phi i32 [ %20, %19 ], [ %.046, %.preheader85 ]
  %22 = getelementptr inbounds i8, ptr %.052, i64 1
  br label %.preheader85, !llvm.loop !8

23:                                               ; preds = %.preheader85
  %.not68 = icmp eq i32 %.046, 2
  br i1 %.not68, label %24, label %48

24:                                               ; preds = %23
  %25 = add nuw nsw i64 %10, 1
  %26 = tail call ptr @CRYPTO_memdup(ptr noundef nonnull %0, i64 noundef %25, ptr noundef nonnull @.str, i32 noundef 484) #3
  %27 = icmp eq ptr %26, null
  br i1 %27, label %.thread78, label %.preheader

.preheader:                                       ; preds = %24, %.thread72
  %.04895 = phi i32 [ %42, %.thread72 ], [ 0, %24 ]
  %.05094 = phi i16 [ %.1517175, %.thread72 ], [ 0, %24 ]
  %.15393 = phi ptr [ %.254, %.thread72 ], [ %26, %24 ]
  %.05891 = phi i16 [ %.15976, %.thread72 ], [ 0, %24 ]
  %28 = tail call ptr @strchr(ptr noundef nonnull dereferenceable(1) %.15393, i32 noundef 44) #4
  %.not69 = icmp ne ptr %28, null
  br i1 %.not69, label %29, label %30

29:                                               ; preds = %.preheader
  store i8 0, ptr %28, align 1, !tbaa !5
  br label %30

30:                                               ; preds = %29, %.preheader
  switch i32 %.04895, label %.thread72.thread [
    i32 0, label %31
    i32 1, label %34
    i32 2, label %37
  ]

31:                                               ; preds = %30
  %32 = tail call zeroext i16 @synonyms_name2id(ptr noundef nonnull %.15393, ptr noundef nonnull @kemstrtab, i64 noundef 5)
  %33 = icmp eq i16 %32, 0
  br i1 %33, label %.thread78, label %.thread72

34:                                               ; preds = %30
  %35 = tail call zeroext i16 @synonyms_name2id(ptr noundef nonnull %.15393, ptr noundef nonnull @kdfstrtab, i64 noundef 3)
  %36 = icmp eq i16 %35, 0
  br i1 %36, label %.thread78, label %.thread72

37:                                               ; preds = %30
  %38 = tail call zeroext i16 @synonyms_name2id(ptr noundef nonnull %.15393, ptr noundef nonnull @aeadstrtab, i64 noundef 4)
  %39 = icmp eq i16 %38, 0
  br i1 %39, label %.thread78, label %.thread72.thread

.thread72.thread:                                 ; preds = %30, %37
  %.156.ph = phi i16 [ %38, %37 ], [ 0, %30 ]
  %40 = add nuw nsw i32 %.04895, 1
  br label %.loopexit

.thread72:                                        ; preds = %31, %34
  %.15976 = phi i16 [ %35, %34 ], [ %.05891, %31 ]
  %.1517175 = phi i16 [ %.05094, %34 ], [ %32, %31 ]
  %41 = getelementptr inbounds i8, ptr %28, i64 1
  %.254 = select i1 %.not69, ptr %41, ptr null
  %42 = add nuw nsw i32 %.04895, 1
  br i1 %.not69, label %.preheader, label %.loopexit

.loopexit:                                        ; preds = %.thread72, %.thread72.thread
  %43 = phi i32 [ %40, %.thread72.thread ], [ %42, %.thread72 ]
  %.156103 = phi i16 [ %.156.ph, %.thread72.thread ], [ 0, %.thread72 ]
  %.1517175102 = phi i16 [ %.05094, %.thread72.thread ], [ %.1517175, %.thread72 ]
  %.15976101 = phi i16 [ %.05891, %.thread72.thread ], [ %.15976, %.thread72 ]
  %44 = icmp ne i32 %43, 3
  %or.cond3 = select i1 %.not69, i1 true, i1 %44
  br i1 %or.cond3, label %.thread78, label %45

45:                                               ; preds = %.loopexit
  store i16 %.1517175102, ptr %1, align 2, !tbaa !10
  %46 = getelementptr inbounds i8, ptr %1, i64 2
  store i16 %.15976101, ptr %46, align 2, !tbaa !13
  %47 = getelementptr inbounds i8, ptr %1, i64 4
  store i16 %.156103, ptr %47, align 2, !tbaa !14
  br label %.thread78

.thread78:                                        ; preds = %34, %31, %37, %.loopexit, %24, %45
  %.047 = phi i32 [ 0, %24 ], [ 0, %.loopexit ], [ 1, %45 ], [ 0, %37 ], [ 0, %31 ], [ 0, %34 ]
  tail call void @CRYPTO_free(ptr noundef %26, ptr noundef nonnull @.str, i32 noundef 526) #3
  br label %48

48:                                               ; preds = %23, %13, %.thread78, %12, %8
  %.0 = phi i32 [ 0, %8 ], [ 0, %12 ], [ %.047, %.thread78 ], [ 0, %13 ], [ 0, %23 ]
  ret i32 %.0
}

declare i64 @OPENSSL_strnlen(ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @CRYPTO_memdup(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @synonyms_name2id(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

attributes #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 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 #2 = { 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 #3 = { nounwind }
attributes #4 = { 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/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !12, i64 0}
!11 = !{!"", !12, i64 0, !12, i64 2, !12, i64 4}
!12 = !{!"short", !6, i64 0}
!13 = !{!11, !12, i64 2}
!14 = !{!11, !12, i64 4}


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