; LLVM IR from openssl/openssl :: crypto/ct (ct_oct)

; 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"

@.str = external hidden unnamed_addr constant [68 x i8], align 1
@__func__.i2o_SCT_LIST = external hidden unnamed_addr constant [13 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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @i2o_SCT_LIST(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  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 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %37

16:                                               ; preds = %2
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %33

20:                                               ; preds = %16
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call i32 @i2o_SCT_LIST(ptr noundef %21, ptr noundef null)
  store i32 %22, ptr %6, align 4, !tbaa !9
  %23 = icmp eq i32 %22, -1
  br i1 %23, label %24, label %25

24:                                               ; preds = %20
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 326, ptr noundef @__func__.i2o_SCT_LIST)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 50, i32 noundef 105, ptr noundef null)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %134

25:                                               ; preds = %20
  %26 = load i32, ptr %6, align 4, !tbaa !9
  %27 = sext i32 %26 to i64
  %28 = call ptr @CRYPTO_malloc(i64 noundef %27, ptr noundef @.str, i32 noundef 329)
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %28, ptr %29, align 8, !tbaa !5
  %30 = icmp eq ptr %28, null
  br i1 %30, label %31, label %32

31:                                               ; preds = %25
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %134

32:                                               ; preds = %25
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %32, %16
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 2
  store ptr %36, ptr %11, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %33, %2
  store i64 2, ptr %10, align 8, !tbaa !11
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %87, %37
  %39 = load i32, ptr %8, align 4, !tbaa !9
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = call ptr @ossl_check_const_SCT_sk_type(ptr noundef %40)
  %42 = call i32 @OPENSSL_sk_num(ptr noundef %41)
  %43 = icmp slt i32 %39, %42
  br i1 %43, label %44, label %90

44:                                               ; preds = %38
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %72

47:                                               ; preds = %44
  %48 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %48, ptr %12, align 8, !tbaa !5
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %49, i64 2
  store ptr %50, ptr %11, align 8, !tbaa !5
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = call ptr @ossl_check_const_SCT_sk_type(ptr noundef %51)
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = call ptr @OPENSSL_sk_value(ptr noundef %52, i32 noundef %53)
  %55 = call i32 @i2o_SCT(ptr noundef %54, ptr noundef %11)
  store i32 %55, ptr %7, align 4, !tbaa !9
  %56 = icmp eq i32 %55, -1
  br i1 %56, label %57, label %58

57:                                               ; preds = %47
  br label %126

58:                                               ; preds = %47
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = ashr i32 %59, 8
  %61 = and i32 %60, 255
  %62 = trunc i32 %61 to i8
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 0
  store i8 %62, ptr %64, align 1, !tbaa !13
  %65 = load i32, ptr %7, align 4, !tbaa !9
  %66 = and i32 %65, 255
  %67 = trunc i32 %66 to i8
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 1
  store i8 %67, ptr %69, align 1, !tbaa !13
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 2
  store ptr %71, ptr %12, align 8, !tbaa !5
  br label %81

72:                                               ; preds = %44
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = call ptr @ossl_check_const_SCT_sk_type(ptr noundef %73)
  %75 = load i32, ptr %8, align 4, !tbaa !9
  %76 = call ptr @OPENSSL_sk_value(ptr noundef %74, i32 noundef %75)
  %77 = call i32 @i2o_SCT(ptr noundef %76, ptr noundef null)
  store i32 %77, ptr %7, align 4, !tbaa !9
  %78 = icmp eq i32 %77, -1
  br i1 %78, label %79, label %80

79:                                               ; preds = %72
  br label %126

80:                                               ; preds = %72
  br label %81

81:                                               ; preds = %80, %58
  %82 = load i32, ptr %7, align 4, !tbaa !9
  %83 = add nsw i32 2, %82
  %84 = sext i32 %83 to i64
  %85 = load i64, ptr %10, align 8, !tbaa !11
  %86 = add i64 %85, %84
  store i64 %86, ptr %10, align 8, !tbaa !11
  br label %87

87:                                               ; preds = %81
  %88 = load i32, ptr %8, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %8, align 4, !tbaa !9
  br label %38, !llvm.loop !14

90:                                               ; preds = %38
  %91 = load i64, ptr %10, align 8, !tbaa !11
  %92 = icmp ugt i64 %91, 65535
  br i1 %92, label %93, label %94

93:                                               ; preds = %90
  br label %126

94:                                               ; preds = %90
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %123

97:                                               ; preds = %94
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  store ptr %99, ptr %11, align 8, !tbaa !5
  %100 = load i64, ptr %10, align 8, !tbaa !11
  %101 = sub i64 %100, 2
  %102 = lshr i64 %101, 8
  %103 = and i64 %102, 255
  %104 = trunc i64 %103 to i8
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds i8, ptr %105, i64 0
  store i8 %104, ptr %106, align 1, !tbaa !13
  %107 = load i64, ptr %10, align 8, !tbaa !11
  %108 = sub i64 %107, 2
  %109 = and i64 %108, 255
  %110 = trunc i64 %109 to i8
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i64 1
  store i8 %110, ptr %112, align 1, !tbaa !13
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = getelementptr inbounds i8, ptr %113, i64 2
  store ptr %114, ptr %11, align 8, !tbaa !5
  %115 = load i32, ptr %9, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %122, label %117

117:                                              ; preds = %97
  %118 = load i64, ptr %10, align 8, !tbaa !11
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = getelementptr inbounds i8, ptr %120, i64 %118
  store ptr %121, ptr %119, align 8, !tbaa !5
  br label %122

122:                                              ; preds = %117, %97
  br label %123

123:                                              ; preds = %122, %94
  %124 = load i64, ptr %10, align 8, !tbaa !11
  %125 = trunc i64 %124 to i32
  store i32 %125, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %134

126:                                              ; preds = %93, %79, %57
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %133

129:                                              ; preds = %126
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %131, ptr noundef @.str, i32 noundef 364)
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr null, ptr %132, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %129, %126
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %13, align 4
  br label %134

134:                                              ; preds = %133, %123, %31, %24
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %135 = load i32, ptr %3, align 4
  ret i32 %135
}

declare i32 @OPENSSL_sk_num(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_const_SCT_sk_type(ptr noundef) #3

declare ptr @OPENSSL_sk_value(ptr noundef, i32 noundef) #1

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 = { inlinehint 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 = { nounwind }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}


; 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"

@.str = external hidden unnamed_addr constant [68 x i8], align 1
@__func__.i2o_SCT_LIST = external hidden unnamed_addr constant [13 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

declare void @ERR_new() local_unnamed_addr #1

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

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

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

declare ptr @CRYPTO_malloc(i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 65536) i32 @i2o_SCT_LIST(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store ptr null, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %28, label %4

4:                                                ; preds = %2
  %5 = load ptr, ptr %1, align 8, !tbaa !5
  %6 = icmp ne ptr %5, null
  br i1 %6, label %25, label %.preheader

.preheader:                                       ; preds = %4
  %7 = tail call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %8 = tail call i32 @OPENSSL_sk_num(ptr noundef %7) #4
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %i2o_SCT_LIST.exit

.lr.ph:                                           ; preds = %.preheader, %14
  %.0.i48 = phi i64 [ %17, %14 ], [ 2, %.preheader ]
  %.034.i47 = phi i32 [ %18, %14 ], [ 0, %.preheader ]
  %10 = tail call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %11 = tail call ptr @OPENSSL_sk_value(ptr noundef %10, i32 noundef %.034.i47) #4
  %12 = tail call i32 @i2o_SCT(ptr noundef %11, ptr noundef null)
  %13 = icmp eq i32 %12, -1
  br i1 %13, label %i2o_SCT_LIST.exit.thread, label %14

14:                                               ; preds = %.lr.ph
  %15 = add nsw i32 %12, 2
  %16 = sext i32 %15 to i64
  %17 = add i64 %.0.i48, %16
  %18 = add nuw nsw i32 %.034.i47, 1
  %19 = tail call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %20 = tail call i32 @OPENSSL_sk_num(ptr noundef %19) #4
  %21 = icmp slt i32 %18, %20
  br i1 %21, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %14
  %22 = icmp ugt i64 %17, 65535
  br i1 %22, label %i2o_SCT_LIST.exit.thread, label %i2o_SCT_LIST.exit

i2o_SCT_LIST.exit:                                ; preds = %.preheader, %._crit_edge
  %.0.i.lcssa60 = phi i64 [ %17, %._crit_edge ], [ 2, %.preheader ]
  %23 = tail call ptr @CRYPTO_malloc(i64 noundef %.0.i.lcssa60, ptr noundef nonnull @.str, i32 noundef 329) #4
  store ptr %23, ptr %1, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %78, label %25

i2o_SCT_LIST.exit.thread:                         ; preds = %.lr.ph, %._crit_edge
  tail call void @ERR_new() #4
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 326, ptr noundef nonnull @__func__.i2o_SCT_LIST) #4
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 50, i32 noundef 105, ptr noundef null) #4
  br label %78

25:                                               ; preds = %i2o_SCT_LIST.exit, %4
  %26 = phi ptr [ %23, %i2o_SCT_LIST.exit ], [ %5, %4 ]
  %27 = getelementptr inbounds i8, ptr %26, i64 2
  store ptr %27, ptr %3, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %25, %2
  %.1 = phi i1 [ %6, %25 ], [ true, %2 ]
  %29 = tail call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %30 = tail call i32 @OPENSSL_sk_num(ptr noundef %29) #4
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph52, label %._crit_edge53.thread

.lr.ph52:                                         ; preds = %28
  br i1 %.not, label %.lr.ph52.split.us, label %.lr.ph52.split

.lr.ph52.split.us:                                ; preds = %.lr.ph52, %36
  %.050.us = phi i64 [ %39, %36 ], [ 2, %.lr.ph52 ]
  %.03449.us = phi i32 [ %40, %36 ], [ 0, %.lr.ph52 ]
  %32 = tail call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %33 = tail call ptr @OPENSSL_sk_value(ptr noundef %32, i32 noundef %.03449.us) #4
  %34 = tail call i32 @i2o_SCT(ptr noundef %33, ptr noundef null)
  %35 = icmp eq i32 %34, -1
  br i1 %35, label %.loopexit, label %36

36:                                               ; preds = %.lr.ph52.split.us
  %37 = add nsw i32 %34, 2
  %38 = sext i32 %37 to i64
  %39 = add i64 %.050.us, %38
  %40 = add nuw nsw i32 %.03449.us, 1
  %41 = tail call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %42 = tail call i32 @OPENSSL_sk_num(ptr noundef %41) #4
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %.lr.ph52.split.us, label %._crit_edge53, !llvm.loop !9

.lr.ph52.split:                                   ; preds = %.lr.ph52, %50
  %.050 = phi i64 [ %57, %50 ], [ 2, %.lr.ph52 ]
  %.03449 = phi i32 [ %58, %50 ], [ 0, %.lr.ph52 ]
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 2
  store ptr %45, ptr %3, align 8, !tbaa !5
  %46 = call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %47 = call ptr @OPENSSL_sk_value(ptr noundef %46, i32 noundef %.03449) #4
  %48 = call i32 @i2o_SCT(ptr noundef %47, ptr noundef nonnull %3)
  %49 = icmp eq i32 %48, -1
  br i1 %49, label %.loopexit, label %50

50:                                               ; preds = %.lr.ph52.split
  %51 = lshr i32 %48, 8
  %52 = trunc i32 %51 to i8
  store i8 %52, ptr %44, align 1, !tbaa !11
  %53 = trunc i32 %48 to i8
  %54 = getelementptr inbounds i8, ptr %44, i64 1
  store i8 %53, ptr %54, align 1, !tbaa !11
  %55 = add nsw i32 %48, 2
  %56 = sext i32 %55 to i64
  %57 = add i64 %.050, %56
  %58 = add nuw nsw i32 %.03449, 1
  %59 = call ptr @ossl_check_const_SCT_sk_type(ptr noundef %0)
  %60 = call i32 @OPENSSL_sk_num(ptr noundef %59) #4
  %61 = icmp slt i32 %58, %60
  br i1 %61, label %.lr.ph52.split, label %._crit_edge53, !llvm.loop !9

._crit_edge53:                                    ; preds = %50, %36
  %.0.lcssa = phi i64 [ %39, %36 ], [ %57, %50 ]
  %62 = icmp ugt i64 %.0.lcssa, 65535
  br i1 %62, label %.loopexit, label %._crit_edge53.thread

._crit_edge53.thread:                             ; preds = %28, %._crit_edge53
  %.0.lcssa62 = phi i64 [ %.0.lcssa, %._crit_edge53 ], [ 2, %28 ]
  br i1 %.not, label %74, label %63

63:                                               ; preds = %._crit_edge53.thread
  %64 = load ptr, ptr %1, align 8, !tbaa !5
  store ptr %64, ptr %3, align 8, !tbaa !5
  %65 = add nsw i64 %.0.lcssa62, -2
  %66 = lshr i64 %65, 8
  %67 = trunc i64 %66 to i8
  store i8 %67, ptr %64, align 1, !tbaa !11
  %68 = trunc i64 %65 to i8
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 1
  store i8 %68, ptr %70, align 1, !tbaa !11
  br i1 %.1, label %71, label %74

71:                                               ; preds = %63
  %72 = load ptr, ptr %1, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 %.0.lcssa62
  store ptr %73, ptr %1, align 8, !tbaa !5
  br label %74

74:                                               ; preds = %63, %71, %._crit_edge53.thread
  %75 = trunc nuw nsw i64 %.0.lcssa62 to i32
  br label %78

.loopexit:                                        ; preds = %.lr.ph52.split, %.lr.ph52.split.us, %._crit_edge53
  br i1 %.1, label %78, label %76

76:                                               ; preds = %.loopexit
  %77 = load ptr, ptr %1, align 8, !tbaa !5
  call void @CRYPTO_free(ptr noundef %77, ptr noundef nonnull @.str, i32 noundef 364) #4
  store ptr null, ptr %1, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %.loopexit, %76, %i2o_SCT_LIST.exit, %74, %i2o_SCT_LIST.exit.thread
  %.036 = phi i32 [ -1, %i2o_SCT_LIST.exit.thread ], [ %75, %74 ], [ -1, %i2o_SCT_LIST.exit ], [ -1, %76 ], [ -1, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i32 %.036
}

declare i32 @OPENSSL_sk_num(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @ossl_check_const_SCT_sk_type(ptr noundef) local_unnamed_addr #3

declare ptr @OPENSSL_sk_value(ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { inlinehint 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 = { nounwind }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!7, !7, i64 0}


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