; LLVM IR from specinfo-ua/UAPKI :: library/uapkif/src/asn1 (OCTET_STRING)

; 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.OCTET_STRING__xer_escape_table_s = type { ptr, i32 }
%struct.asn_enc_rval_s = type { i64, ptr, ptr }
%struct.OCTET_STRING = type { ptr, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }

@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@OCTET_STRING__xer_escape_table = external hidden constant [63 x %struct.OCTET_STRING__xer_escape_table_s], 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 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @OCTET_STRING_encode_xer_utf8(ptr dead_on_unwind noalias writable sret(%struct.asn_enc_rval_s) align 8 %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.asn_enc_rval_s, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  store ptr %6, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %23, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store i64 0, ptr %19, align 8, !tbaa !11
  %24 = load i32, ptr %10, align 4, !tbaa !9
  %25 = load i32, ptr %11, align 4, !tbaa !9
  %26 = load ptr, ptr %14, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %38

28:                                               ; preds = %7
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.OCTET_STRING, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !13
  %32 = icmp ne ptr %31, null
  br i1 %32, label %47, label %33

33:                                               ; preds = %28
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.OCTET_STRING, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 8, !tbaa !17
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %47

38:                                               ; preds = %33, %7
  br label %39

39:                                               ; preds = %38
  %40 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %40, align 8, !tbaa !18
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %41, ptr %42, align 8, !tbaa !20
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %43, ptr %44, align 8, !tbaa !21
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 810, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %179

45:                                               ; No predecessors!
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46, %33, %28
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.OCTET_STRING, ptr %48, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  store ptr %50, ptr %16, align 8, !tbaa !5
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.OCTET_STRING, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 8, !tbaa !17
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds i8, ptr %51, i64 %55
  store ptr %56, ptr %17, align 8, !tbaa !5
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %57, ptr %18, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %134, %47
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = icmp ult ptr %59, %60
  br i1 %61, label %62, label %137

62:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = load i8, ptr %63, align 1, !tbaa !22
  %65 = zext i8 %64 to i32
  store i32 %65, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %66 = load i32, ptr %21, align 4, !tbaa !9
  %67 = zext i32 %66 to i64
  %68 = icmp ult i64 %67, 63
  br i1 %68, label %69, label %130

69:                                               ; preds = %62
  %70 = load i32, ptr %21, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds [63 x %struct.OCTET_STRING__xer_escape_table_s], ptr @OCTET_STRING__xer_escape_table, i64 0, i64 %71
  %73 = getelementptr inbounds %struct.OCTET_STRING__xer_escape_table_s, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 8, !tbaa !23
  store i32 %74, ptr %22, align 4, !tbaa !9
  %75 = load i32, ptr %22, align 4, !tbaa !9
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %129

77:                                               ; preds = %69
  %78 = load ptr, ptr %16, align 8, !tbaa !5
  %79 = load ptr, ptr %18, align 8, !tbaa !5
  %80 = ptrtoint ptr %78 to i64
  %81 = ptrtoint ptr %79 to i64
  %82 = sub i64 %80, %81
  %83 = icmp ne i64 %82, 0
  br i1 %83, label %84, label %95

84:                                               ; preds = %77
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = load ptr, ptr %18, align 8, !tbaa !5
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  %88 = load ptr, ptr %18, align 8, !tbaa !5
  %89 = ptrtoint ptr %87 to i64
  %90 = ptrtoint ptr %88 to i64
  %91 = sub i64 %89, %90
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = call i32 %85(ptr noundef %86, i64 noundef %91, ptr noundef %92)
  %94 = icmp slt i32 %93, 0
  br i1 %94, label %107, label %95

95:                                               ; preds = %84, %77
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = load i32, ptr %21, align 4, !tbaa !9
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds [63 x %struct.OCTET_STRING__xer_escape_table_s], ptr @OCTET_STRING__xer_escape_table, i64 0, i64 %98
  %100 = getelementptr inbounds %struct.OCTET_STRING__xer_escape_table_s, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 16, !tbaa !25
  %102 = load i32, ptr %22, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = call i32 %96(ptr noundef %101, i64 noundef %103, ptr noundef %104)
  %106 = icmp slt i32 %105, 0
  br i1 %106, label %107, label %116

107:                                              ; preds = %95, %84
  br label %108

108:                                              ; preds = %107
  %109 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %109, align 8, !tbaa !18
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %110, ptr %111, align 8, !tbaa !20
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %112, ptr %113, align 8, !tbaa !21
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 828, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %131

114:                                              ; No predecessors!
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115, %95
  %117 = load ptr, ptr %16, align 8, !tbaa !5
  %118 = load ptr, ptr %18, align 8, !tbaa !5
  %119 = ptrtoint ptr %117 to i64
  %120 = ptrtoint ptr %118 to i64
  %121 = sub i64 %119, %120
  %122 = load i32, ptr %22, align 4, !tbaa !9
  %123 = sext i32 %122 to i64
  %124 = add nsw i64 %121, %123
  %125 = load i64, ptr %19, align 8, !tbaa !11
  %126 = add nsw i64 %125, %124
  store i64 %126, ptr %19, align 8, !tbaa !11
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = getelementptr inbounds i8, ptr %127, i64 1
  store ptr %128, ptr %18, align 8, !tbaa !5
  br label %129

129:                                              ; preds = %116, %69
  br label %130

130:                                              ; preds = %129, %62
  store i32 0, ptr %20, align 4
  br label %131

131:                                              ; preds = %130, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  %132 = load i32, ptr %20, align 4
  switch i32 %132, label %179 [
    i32 0, label %133
  ]

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %16, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i32 1
  store ptr %136, ptr %16, align 8, !tbaa !5
  br label %58, !llvm.loop !26

137:                                              ; preds = %58
  %138 = load ptr, ptr %16, align 8, !tbaa !5
  %139 = load ptr, ptr %18, align 8, !tbaa !5
  %140 = ptrtoint ptr %138 to i64
  %141 = ptrtoint ptr %139 to i64
  %142 = sub i64 %140, %141
  %143 = load i64, ptr %19, align 8, !tbaa !11
  %144 = add nsw i64 %143, %142
  store i64 %144, ptr %19, align 8, !tbaa !11
  %145 = load ptr, ptr %16, align 8, !tbaa !5
  %146 = load ptr, ptr %18, align 8, !tbaa !5
  %147 = ptrtoint ptr %145 to i64
  %148 = ptrtoint ptr %146 to i64
  %149 = sub i64 %147, %148
  %150 = icmp ne i64 %149, 0
  br i1 %150, label %151, label %171

151:                                              ; preds = %137
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = load ptr, ptr %18, align 8, !tbaa !5
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = load ptr, ptr %18, align 8, !tbaa !5
  %156 = ptrtoint ptr %154 to i64
  %157 = ptrtoint ptr %155 to i64
  %158 = sub i64 %156, %157
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = call i32 %152(ptr noundef %153, i64 noundef %158, ptr noundef %159)
  %161 = icmp slt i32 %160, 0
  br i1 %161, label %162, label %171

162:                                              ; preds = %151
  br label %163

163:                                              ; preds = %162
  %164 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %164, align 8, !tbaa !18
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %165, ptr %166, align 8, !tbaa !20
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %167, ptr %168, align 8, !tbaa !21
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 838, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %179

169:                                              ; No predecessors!
  br label %170

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170, %151, %137
  %172 = load i64, ptr %19, align 8, !tbaa !11
  %173 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 0
  store i64 %172, ptr %173, align 8, !tbaa !18
  br label %174

174:                                              ; preds = %171
  %175 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 2
  store ptr null, ptr %175, align 8, !tbaa !21
  %176 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 1
  store ptr null, ptr %176, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %15, i64 24, i1 false), !tbaa.struct !28
  store i32 1, ptr %20, align 4
  br label %179

177:                                              ; No predecessors!
  br label %178

178:                                              ; preds = %177
  store i32 0, ptr %20, align 4
  br label %179

179:                                              ; preds = %178, %174, %163, %131, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %180 = load i32, ptr %20, align 4
  switch i32 %180, label %182 [
    i32 0, label %181
    i32 1, label %181
  ]

181:                                              ; preds = %179, %179
  ret void

182:                                              ; preds = %179
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!14, !6, i64 0}
!14 = !{!"OCTET_STRING", !6, i64 0, !10, i64 8, !15, i64 16}
!15 = !{!"asn_struct_ctx_s", !16, i64 0, !16, i64 2, !10, i64 4, !6, i64 8, !12, i64 16}
!16 = !{!"short", !7, i64 0}
!17 = !{!14, !10, i64 8}
!18 = !{!19, !12, i64 0}
!19 = !{!"asn_enc_rval_s", !12, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!19, !6, i64 8}
!21 = !{!19, !6, i64 16}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !10, i64 8}
!24 = !{!"OCTET_STRING__xer_escape_table_s", !6, i64 0, !10, i64 8}
!25 = !{!24, !6, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{i64 0, i64 8, !11, i64 8, i64 8, !5, i64 16, i64 8, !5}


; 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.OCTET_STRING__xer_escape_table_s = type { ptr, i32 }
%struct.asn_enc_rval_s = type { i64, ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@OCTET_STRING__xer_escape_table = external hidden local_unnamed_addr constant [63 x %struct.OCTET_STRING__xer_escape_table_s], align 16

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

; Function Attrs: nounwind uwtable
define dso_local void @OCTET_STRING_encode_xer_utf8(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.asn_enc_rval_s) align 8 %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr nocapture noundef readonly %5, ptr noundef %6) local_unnamed_addr #1 {
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %13, label %8

8:                                                ; preds = %7
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %.not60 = icmp eq ptr %9, null
  %10 = getelementptr inbounds i8, ptr %2, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !14
  br i1 %.not60, label %12, label %16

12:                                               ; preds = %8
  %.not61 = icmp eq i32 %11, 0
  br i1 %.not61, label %._crit_edge.thread, label %13

13:                                               ; preds = %7, %12
  store i64 -1, ptr %0, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %14, align 8, !tbaa !17
  %15 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %2, ptr %15, align 8, !tbaa !18
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 810, i32 noundef 101, ptr noundef null) #3
  br label %60

16:                                               ; preds = %8
  %17 = sext i32 %11 to i64
  %18 = getelementptr inbounds i8, ptr %9, i64 %17
  %19 = icmp sgt i32 %11, 0
  br i1 %19, label %.lr.ph, label %._crit_edge.thread

.lr.ph:                                           ; preds = %16, %46
  %.075 = phi ptr [ %47, %46 ], [ %9, %16 ]
  %.05074 = phi ptr [ %.2.ph, %46 ], [ %9, %16 ]
  %.05273 = phi i64 [ %.254.ph, %46 ], [ 0, %16 ]
  %20 = load i8, ptr %.075, align 1, !tbaa !19
  %21 = icmp ult i8 %20, 63
  br i1 %21, label %22, label %46

22:                                               ; preds = %.lr.ph
  %23 = zext nneg i8 %20 to i64
  %24 = getelementptr inbounds [63 x %struct.OCTET_STRING__xer_escape_table_s], ptr @OCTET_STRING__xer_escape_table, i64 0, i64 %23
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !20
  %.not63 = icmp eq i32 %26, 0
  br i1 %.not63, label %46, label %27

27:                                               ; preds = %22
  %28 = ptrtoint ptr %.075 to i64
  %29 = ptrtoint ptr %.05074 to i64
  %30 = sub i64 %28, %29
  %.not64 = icmp eq ptr %.075, %.05074
  br i1 %.not64, label %34, label %31

31:                                               ; preds = %27
  %32 = tail call i32 %5(ptr noundef %.05074, i64 noundef %30, ptr noundef %6) #3
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %43, label %34

34:                                               ; preds = %31, %27
  %35 = load ptr, ptr %24, align 16, !tbaa !22
  %36 = sext i32 %26 to i64
  %37 = tail call i32 %5(ptr noundef %35, i64 noundef %36, ptr noundef %6) #3
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %43, label %39

39:                                               ; preds = %34
  %40 = add i64 %30, %.05273
  %41 = add i64 %40, %36
  %42 = getelementptr inbounds i8, ptr %.075, i64 1
  br label %46

43:                                               ; preds = %34, %31
  store i64 -1, ptr %0, align 8, !tbaa !15
  %44 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %44, align 8, !tbaa !17
  %45 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %2, ptr %45, align 8, !tbaa !18
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 828, i32 noundef 101, ptr noundef null) #3
  br label %60

46:                                               ; preds = %22, %39, %.lr.ph
  %.254.ph = phi i64 [ %.05273, %.lr.ph ], [ %.05273, %22 ], [ %41, %39 ]
  %.2.ph = phi ptr [ %.05074, %.lr.ph ], [ %.05074, %22 ], [ %42, %39 ]
  %47 = getelementptr inbounds i8, ptr %.075, i64 1
  %48 = icmp ult ptr %47, %18
  br i1 %48, label %.lr.ph, label %._crit_edge, !llvm.loop !23

._crit_edge:                                      ; preds = %46
  %49 = ptrtoint ptr %47 to i64
  %50 = ptrtoint ptr %.2.ph to i64
  %51 = sub i64 %49, %50
  %52 = add nsw i64 %51, %.254.ph
  %.not62 = icmp eq ptr %47, %.2.ph
  br i1 %.not62, label %._crit_edge.thread, label %53

53:                                               ; preds = %._crit_edge
  %54 = tail call i32 %5(ptr noundef %.2.ph, i64 noundef %51, ptr noundef %6) #3
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %56, label %._crit_edge.thread

56:                                               ; preds = %53
  store i64 -1, ptr %0, align 8, !tbaa !15
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %57, align 8, !tbaa !17
  %58 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %2, ptr %58, align 8, !tbaa !18
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 838, i32 noundef 101, ptr noundef null) #3
  br label %60

._crit_edge.thread:                               ; preds = %12, %16, %53, %._crit_edge
  %59 = phi i64 [ %52, %53 ], [ %52, %._crit_edge ], [ 0, %16 ], [ 0, %12 ]
  store i64 %59, ptr %0, align 8, !tbaa !25
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %.sroa.4.0..sroa_idx, i8 0, i64 16, i1 false)
  br label %60

60:                                               ; preds = %43, %._crit_edge.thread, %56, %13
  ret void
}

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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, !7, i64 0}
!6 = !{!"OCTET_STRING", !7, i64 0, !10, i64 8, !11, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"asn_struct_ctx_s", !12, i64 0, !12, i64 2, !10, i64 4, !7, i64 8, !13, i64 16}
!12 = !{!"short", !8, i64 0}
!13 = !{!"long", !8, i64 0}
!14 = !{!6, !10, i64 8}
!15 = !{!16, !13, i64 0}
!16 = !{!"asn_enc_rval_s", !13, i64 0, !7, i64 8, !7, i64 16}
!17 = !{!16, !7, i64 8}
!18 = !{!16, !7, i64 16}
!19 = !{!8, !8, i64 0}
!20 = !{!21, !10, i64 8}
!21 = !{!"OCTET_STRING__xer_escape_table_s", !7, i64 0, !10, i64 8}
!22 = !{!21, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!13, !13, i64 0}


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