; 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.asn_OCTET_STRING_specifics_s = type { i32, i32, i32 }
%struct.asn_per_constraints_s = type { %struct.asn_per_constraint_s, %struct.asn_per_constraint_s, ptr, ptr }
%struct.asn_per_constraint_s = type { i32, i32, i32, i64, i64 }
%struct.asn_enc_rval_s = type { i64, ptr, ptr }
%struct.asn_TYPE_descriptor_s = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, ptr, i32, ptr, ptr, i32, ptr }
%struct.BIT_STRING_s = type { ptr, i32, i32, %struct.asn_struct_ctx_s }
%struct.asn_struct_ctx_s = type { i16, i16, i32, ptr, i64 }

@asn_DEF_OCTET_STRING_specs = external hidden constant %struct.asn_OCTET_STRING_specifics_s, align 4
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@asn_DEF_OCTET_STRING_constraints = external hidden constant %struct.asn_per_constraints_s, align 8

; Function Attrs: nounwind uwtable
define dso_local void @OCTET_STRING_encode_uper(ptr dead_on_unwind noalias writable sret(%struct.asn_enc_rval_s) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %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 i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store ptr %4, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %26, i32 0, i32 19
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %34

30:                                               ; preds = %5
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %31, i32 0, i32 19
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  br label %35

34:                                               ; preds = %5
  br label %35

35:                                               ; preds = %34, %30
  %36 = phi ptr [ %33, %30 ], [ @asn_DEF_OCTET_STRING_specs, %34 ]
  store ptr %36, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %41

39:                                               ; preds = %35
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  br label %45

41:                                               ; preds = %35
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %42, i32 0, i32 16
  %44 = load ptr, ptr %43, align 8, !tbaa !12
  br label %45

45:                                               ; preds = %41, %39
  %46 = phi ptr [ %40, %39 ], [ %44, %41 ]
  store ptr %46, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %47, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %60

50:                                               ; preds = %45
  %51 = load ptr, ptr %14, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.BIT_STRING_s, ptr %51, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = icmp ne ptr %53, null
  br i1 %54, label %69, label %55

55:                                               ; preds = %50
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.BIT_STRING_s, ptr %56, i32 0, i32 1
  %58 = load i32, ptr %57, align 8, !tbaa !19
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %69

60:                                               ; preds = %55, %45
  br label %61

61:                                               ; preds = %60
  %62 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %62, align 8, !tbaa !20
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %63, ptr %64, align 8, !tbaa !22
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %65, ptr %66, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1718, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %393

67:                                               ; No predecessors!
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68, %55, %50
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %77

72:                                               ; preds = %69
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %73, i32 0, i32 0
  store ptr %74, ptr %12, align 8, !tbaa !5
  %75 = load ptr, ptr %11, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %75, i32 0, i32 1
  store ptr %76, ptr %13, align 8, !tbaa !5
  br label %78

77:                                               ; preds = %69
  store ptr @asn_DEF_OCTET_STRING_constraints, ptr %12, align 8, !tbaa !5
  store ptr getelementptr inbounds (%struct.asn_per_constraints_s, ptr @asn_DEF_OCTET_STRING_constraints, i32 0, i32 1), ptr %13, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %77, %72
  %79 = load ptr, ptr %13, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !24
  %82 = and i32 %81, 4
  store i32 %82, ptr %23, align 4, !tbaa !13
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.asn_OCTET_STRING_specifics_s, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !26
  switch i32 %85, label %86 [
    i32 0, label %87
    i32 1, label %96
    i32 2, label %106
    i32 3, label %120
    i32 4, label %135
  ]

86:                                               ; preds = %78
  br label %87

87:                                               ; preds = %86, %78
  br label %88

88:                                               ; preds = %87
  %89 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %89, align 8, !tbaa !20
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %90, ptr %91, align 8, !tbaa !22
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %92, ptr %93, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1733, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %393

94:                                               ; No predecessors!
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95, %78
  store i32 1, ptr %17, align 4, !tbaa !13
  store i32 1, ptr %18, align 4, !tbaa !13
  store i32 0, ptr %22, align 4, !tbaa !13
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.BIT_STRING_s, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !19
  %100 = mul nsw i32 %99, 8
  %101 = load ptr, ptr %14, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.BIT_STRING_s, ptr %101, i32 0, i32 2
  %103 = load i32, ptr %102, align 4, !tbaa !28
  %104 = and i32 %103, 7
  %105 = sub nsw i32 %100, %104
  store i32 %105, ptr %19, align 4, !tbaa !13
  br label %150

106:                                              ; preds = %78
  store i32 8, ptr %17, align 4, !tbaa !13
  store i32 8, ptr %18, align 4, !tbaa !13
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %107, i32 0, i32 0
  %109 = load i32, ptr %108, align 8, !tbaa !24
  %110 = and i32 %109, 2
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %116

112:                                              ; preds = %106
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %113, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !29
  store i32 %115, ptr %17, align 4, !tbaa !13
  br label %116

116:                                              ; preds = %112, %106
  store i32 1, ptr %22, align 4, !tbaa !13
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.BIT_STRING_s, ptr %117, i32 0, i32 1
  %119 = load i32, ptr %118, align 8, !tbaa !19
  store i32 %119, ptr %19, align 4, !tbaa !13
  br label %150

120:                                              ; preds = %78
  store i32 16, ptr %17, align 4, !tbaa !13
  store i32 16, ptr %18, align 4, !tbaa !13
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 8, !tbaa !24
  %124 = and i32 %123, 2
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %130

126:                                              ; preds = %120
  %127 = load ptr, ptr %12, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %127, i32 0, i32 1
  %129 = load i32, ptr %128, align 4, !tbaa !29
  store i32 %129, ptr %17, align 4, !tbaa !13
  br label %130

130:                                              ; preds = %126, %120
  store i32 2, ptr %22, align 4, !tbaa !13
  %131 = load ptr, ptr %14, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.BIT_STRING_s, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 8, !tbaa !19
  %134 = sdiv i32 %133, 2
  store i32 %134, ptr %19, align 4, !tbaa !13
  br label %150

135:                                              ; preds = %78
  store i32 32, ptr %17, align 4, !tbaa !13
  store i32 32, ptr %18, align 4, !tbaa !13
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %136, i32 0, i32 0
  %138 = load i32, ptr %137, align 8, !tbaa !24
  %139 = and i32 %138, 2
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %145

141:                                              ; preds = %135
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %142, i32 0, i32 1
  %144 = load i32, ptr %143, align 4, !tbaa !29
  store i32 %144, ptr %17, align 4, !tbaa !13
  br label %145

145:                                              ; preds = %141, %135
  store i32 4, ptr %22, align 4, !tbaa !13
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.BIT_STRING_s, ptr %146, i32 0, i32 1
  %148 = load i32, ptr %147, align 8, !tbaa !19
  %149 = sdiv i32 %148, 4
  store i32 %149, ptr %19, align 4, !tbaa !13
  br label %150

150:                                              ; preds = %145, %130, %116, %96
  %151 = load ptr, ptr %13, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %152, align 8, !tbaa !30
  %154 = icmp sge i32 %153, 0
  br i1 %154, label %155, label %185

155:                                              ; preds = %150
  %156 = load i32, ptr %19, align 4, !tbaa !13
  %157 = sext i32 %156 to i64
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %158, i32 0, i32 3
  %160 = load i64, ptr %159, align 8, !tbaa !31
  %161 = icmp slt i64 %157, %160
  br i1 %161, label %169, label %162

162:                                              ; preds = %155
  %163 = load i32, ptr %19, align 4, !tbaa !13
  %164 = sext i32 %163 to i64
  %165 = load ptr, ptr %13, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %165, i32 0, i32 4
  %167 = load i64, ptr %166, align 8, !tbaa !32
  %168 = icmp sgt i64 %164, %167
  br i1 %168, label %169, label %184

169:                                              ; preds = %162, %155
  %170 = load i32, ptr %23, align 4, !tbaa !13
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %172, label %174

172:                                              ; preds = %169
  store ptr @asn_DEF_OCTET_STRING_constraints, ptr %12, align 8, !tbaa !5
  store ptr getelementptr inbounds (%struct.asn_per_constraints_s, ptr @asn_DEF_OCTET_STRING_constraints, i32 0, i32 1), ptr %13, align 8, !tbaa !5
  %173 = load i32, ptr %18, align 4, !tbaa !13
  store i32 %173, ptr %17, align 4, !tbaa !13
  store i32 1, ptr %16, align 4, !tbaa !13
  br label %183

174:                                              ; preds = %169
  br label %175

175:                                              ; preds = %174
  %176 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %176, align 8, !tbaa !20
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %177, ptr %178, align 8, !tbaa !22
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %179, ptr %180, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1784, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %393

181:                                              ; No predecessors!
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182, %172
  br label %184

184:                                              ; preds = %183, %162
  br label %186

185:                                              ; preds = %150
  store i32 0, ptr %16, align 4, !tbaa !13
  br label %186

186:                                              ; preds = %185, %184
  %187 = load i32, ptr %23, align 4, !tbaa !13
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %204

189:                                              ; preds = %186
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = load i32, ptr %16, align 4, !tbaa !13
  %192 = call i32 @per_put_few_bits(ptr noundef %190, i32 noundef %191, i32 noundef 1)
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %203

194:                                              ; preds = %189
  br label %195

195:                                              ; preds = %194
  %196 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %196, align 8, !tbaa !20
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %197, ptr %198, align 8, !tbaa !22
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %199, ptr %200, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1794, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %393

201:                                              ; No predecessors!
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202, %189
  br label %204

204:                                              ; preds = %203, %186
  %205 = load ptr, ptr %13, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %205, i32 0, i32 2
  %207 = load i32, ptr %206, align 8, !tbaa !30
  %208 = icmp sge i32 %207, 0
  br i1 %208, label %209, label %280

209:                                              ; preds = %204
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  %211 = load i32, ptr %19, align 4, !tbaa !13
  %212 = zext i32 %211 to i64
  %213 = load ptr, ptr %13, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %213, i32 0, i32 3
  %215 = load i64, ptr %214, align 8, !tbaa !31
  %216 = sub nsw i64 %212, %215
  %217 = trunc i64 %216 to i32
  %218 = load ptr, ptr %13, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %218, i32 0, i32 2
  %220 = load i32, ptr %219, align 8, !tbaa !30
  %221 = call i32 @per_put_few_bits(ptr noundef %210, i32 noundef %217, i32 noundef %220)
  store i32 %221, ptr %21, align 4, !tbaa !13
  %222 = load i32, ptr %21, align 4, !tbaa !13
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %224, label %233

224:                                              ; preds = %209
  br label %225

225:                                              ; preds = %224
  %226 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %226, align 8, !tbaa !20
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %227, ptr %228, align 8, !tbaa !22
  %229 = load ptr, ptr %8, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %229, ptr %230, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1808, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %393

231:                                              ; No predecessors!
  br label %232

232:                                              ; preds = %231
  br label %233

233:                                              ; preds = %232, %209
  %234 = load i32, ptr %22, align 4, !tbaa !13
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %236, label %253

236:                                              ; preds = %233
  %237 = load ptr, ptr %9, align 8, !tbaa !5
  %238 = load ptr, ptr %14, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.BIT_STRING_s, ptr %238, i32 0, i32 0
  %240 = load ptr, ptr %239, align 8, !tbaa !14
  %241 = load i32, ptr %19, align 4, !tbaa !13
  %242 = zext i32 %241 to i64
  %243 = load i32, ptr %22, align 4, !tbaa !13
  %244 = load i32, ptr %17, align 4, !tbaa !13
  %245 = load ptr, ptr %12, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %245, i32 0, i32 3
  %247 = load i64, ptr %246, align 8, !tbaa !31
  %248 = load ptr, ptr %12, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %248, i32 0, i32 4
  %250 = load i64, ptr %249, align 8, !tbaa !32
  %251 = load ptr, ptr %11, align 8, !tbaa !5
  %252 = call i32 @OCTET_STRING_per_put_characters(ptr noundef %237, ptr noundef %240, i64 noundef %242, i32 noundef %243, i32 noundef %244, i64 noundef %247, i64 noundef %250, ptr noundef %251)
  store i32 %252, ptr %21, align 4, !tbaa !13
  br label %262

253:                                              ; preds = %233
  %254 = load ptr, ptr %9, align 8, !tbaa !5
  %255 = load ptr, ptr %14, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.BIT_STRING_s, ptr %255, i32 0, i32 0
  %257 = load ptr, ptr %256, align 8, !tbaa !14
  %258 = load i32, ptr %19, align 4, !tbaa !13
  %259 = load i32, ptr %17, align 4, !tbaa !13
  %260 = mul i32 %258, %259
  %261 = call i32 @per_put_many_bits(ptr noundef %254, ptr noundef %257, i32 noundef %260)
  store i32 %261, ptr %21, align 4, !tbaa !13
  br label %262

262:                                              ; preds = %253, %236
  %263 = load i32, ptr %21, align 4, !tbaa !13
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %265, label %274

265:                                              ; preds = %262
  br label %266

266:                                              ; preds = %265
  %267 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %267, align 8, !tbaa !20
  %268 = load ptr, ptr %6, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %268, ptr %269, align 8, !tbaa !22
  %270 = load ptr, ptr %8, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %270, ptr %271, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1819, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %393

272:                                              ; No predecessors!
  br label %273

273:                                              ; preds = %272
  br label %274

274:                                              ; preds = %273, %262
  br label %275

275:                                              ; preds = %274
  %276 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 2
  store ptr null, ptr %276, align 8, !tbaa !23
  %277 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 1
  store ptr null, ptr %277, align 8, !tbaa !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %15, i64 24, i1 false), !tbaa.struct !33
  store i32 1, ptr %24, align 4
  br label %393

278:                                              ; No predecessors!
  br label %279

279:                                              ; preds = %278
  br label %280

280:                                              ; preds = %279, %204
  %281 = load i32, ptr %19, align 4, !tbaa !13
  %282 = icmp eq i32 %281, 0
  br i1 %282, label %283, label %302

283:                                              ; preds = %280
  %284 = load ptr, ptr %9, align 8, !tbaa !5
  %285 = call i64 @uper_put_length(ptr noundef %284, i64 noundef 0)
  %286 = icmp ne i64 %285, 0
  br i1 %286, label %287, label %296

287:                                              ; preds = %283
  br label %288

288:                                              ; preds = %287
  %289 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %289, align 8, !tbaa !20
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %290, ptr %291, align 8, !tbaa !22
  %292 = load ptr, ptr %8, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %292, ptr %293, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1828, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %393

294:                                              ; No predecessors!
  br label %295

295:                                              ; preds = %294
  br label %296

296:                                              ; preds = %295, %283
  br label %297

297:                                              ; preds = %296
  %298 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 2
  store ptr null, ptr %298, align 8, !tbaa !23
  %299 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 1
  store ptr null, ptr %299, align 8, !tbaa !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %15, i64 24, i1 false), !tbaa.struct !33
  store i32 1, ptr %24, align 4
  br label %393

300:                                              ; No predecessors!
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301, %280
  %303 = load ptr, ptr %14, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.BIT_STRING_s, ptr %303, i32 0, i32 0
  %305 = load ptr, ptr %304, align 8, !tbaa !14
  store ptr %305, ptr %20, align 8, !tbaa !5
  br label %306

306:                                              ; preds = %386, %302
  %307 = load i32, ptr %19, align 4, !tbaa !13
  %308 = icmp ne i32 %307, 0
  br i1 %308, label %309, label %387

309:                                              ; preds = %306
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %310 = load ptr, ptr %9, align 8, !tbaa !5
  %311 = load i32, ptr %19, align 4, !tbaa !13
  %312 = zext i32 %311 to i64
  %313 = call i64 @uper_put_length(ptr noundef %310, i64 noundef %312)
  store i64 %313, ptr %25, align 8, !tbaa !34
  %314 = load i64, ptr %25, align 8, !tbaa !34
  %315 = icmp slt i64 %314, 0
  br i1 %315, label %316, label %325

316:                                              ; preds = %309
  br label %317

317:                                              ; preds = %316
  %318 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %318, align 8, !tbaa !20
  %319 = load ptr, ptr %6, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %319, ptr %320, align 8, !tbaa !22
  %321 = load ptr, ptr %8, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %321, ptr %322, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1837, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %384

323:                                              ; No predecessors!
  br label %324

324:                                              ; preds = %323
  br label %325

325:                                              ; preds = %324, %309
  %326 = load i32, ptr %22, align 4, !tbaa !13
  %327 = icmp ne i32 %326, 0
  br i1 %327, label %328, label %342

328:                                              ; preds = %325
  %329 = load ptr, ptr %9, align 8, !tbaa !5
  %330 = load ptr, ptr %20, align 8, !tbaa !5
  %331 = load i64, ptr %25, align 8, !tbaa !34
  %332 = load i32, ptr %22, align 4, !tbaa !13
  %333 = load i32, ptr %17, align 4, !tbaa !13
  %334 = load ptr, ptr %12, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %334, i32 0, i32 3
  %336 = load i64, ptr %335, align 8, !tbaa !31
  %337 = load ptr, ptr %12, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %337, i32 0, i32 4
  %339 = load i64, ptr %338, align 8, !tbaa !32
  %340 = load ptr, ptr %11, align 8, !tbaa !5
  %341 = call i32 @OCTET_STRING_per_put_characters(ptr noundef %329, ptr noundef %330, i64 noundef %331, i32 noundef %332, i32 noundef %333, i64 noundef %336, i64 noundef %339, ptr noundef %340)
  store i32 %341, ptr %21, align 4, !tbaa !13
  br label %351

342:                                              ; preds = %325
  %343 = load ptr, ptr %9, align 8, !tbaa !5
  %344 = load ptr, ptr %20, align 8, !tbaa !5
  %345 = load i64, ptr %25, align 8, !tbaa !34
  %346 = load i32, ptr %17, align 4, !tbaa !13
  %347 = zext i32 %346 to i64
  %348 = mul nsw i64 %345, %347
  %349 = trunc i64 %348 to i32
  %350 = call i32 @per_put_many_bits(ptr noundef %343, ptr noundef %344, i32 noundef %349)
  store i32 %350, ptr %21, align 4, !tbaa !13
  br label %351

351:                                              ; preds = %342, %328
  %352 = load i32, ptr %21, align 4, !tbaa !13
  %353 = icmp ne i32 %352, 0
  br i1 %353, label %354, label %363

354:                                              ; preds = %351
  br label %355

355:                                              ; preds = %354
  %356 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %356, align 8, !tbaa !20
  %357 = load ptr, ptr %6, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %357, ptr %358, align 8, !tbaa !22
  %359 = load ptr, ptr %8, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %359, ptr %360, align 8, !tbaa !23
  call void @stacktrace_create(ptr noundef @.str.3, i64 noundef 1851, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %24, align 4
  br label %384

361:                                              ; No predecessors!
  br label %362

362:                                              ; preds = %361
  br label %363

363:                                              ; preds = %362, %351
  %364 = load i32, ptr %22, align 4, !tbaa !13
  %365 = icmp ne i32 %364, 0
  br i1 %365, label %366, label %373

366:                                              ; preds = %363
  %367 = load i64, ptr %25, align 8, !tbaa !34
  %368 = load i32, ptr %22, align 4, !tbaa !13
  %369 = zext i32 %368 to i64
  %370 = mul nsw i64 %367, %369
  %371 = load ptr, ptr %20, align 8, !tbaa !5
  %372 = getelementptr inbounds i8, ptr %371, i64 %370
  store ptr %372, ptr %20, align 8, !tbaa !5
  br label %378

373:                                              ; preds = %363
  %374 = load i64, ptr %25, align 8, !tbaa !34
  %375 = ashr i64 %374, 3
  %376 = load ptr, ptr %20, align 8, !tbaa !5
  %377 = getelementptr inbounds i8, ptr %376, i64 %375
  store ptr %377, ptr %20, align 8, !tbaa !5
  br label %378

378:                                              ; preds = %373, %366
  %379 = load i32, ptr %19, align 4, !tbaa !13
  %380 = zext i32 %379 to i64
  %381 = load i64, ptr %25, align 8, !tbaa !34
  %382 = sub nsw i64 %380, %381
  %383 = trunc i64 %382 to i32
  store i32 %383, ptr %19, align 4, !tbaa !13
  store i32 0, ptr %24, align 4
  br label %384

384:                                              ; preds = %378, %355, %317
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  %385 = load i32, ptr %24, align 4
  switch i32 %385, label %393 [
    i32 0, label %386
  ]

386:                                              ; preds = %384
  br label %306, !llvm.loop !35

387:                                              ; preds = %306
  br label %388

388:                                              ; preds = %387
  %389 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 2
  store ptr null, ptr %389, align 8, !tbaa !23
  %390 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %15, i32 0, i32 1
  store ptr null, ptr %390, align 8, !tbaa !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %15, i64 24, i1 false), !tbaa.struct !33
  store i32 1, ptr %24, align 4
  br label %393

391:                                              ; No predecessors!
  br label %392

392:                                              ; preds = %391
  store i32 0, ptr %24, align 4
  br label %393

393:                                              ; preds = %392, %388, %384, %297, %288, %275, %266, %225, %195, %175, %88, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %394 = load i32, ptr %24, align 4
  switch i32 %394, label %396 [
    i32 0, label %395
    i32 1, label %395
  ]

395:                                              ; preds = %393, %393
  ret void

396:                                              ; preds = %393
  unreachable
}

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

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

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

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

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

declare i32 @per_put_few_bits(ptr noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden i32 @OCTET_STRING_per_put_characters(ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef) #0

declare i32 @per_put_many_bits(ptr noundef, ptr noundef, i32 noundef) #3

declare i64 @uper_put_length(ptr noundef, i64 noundef) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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, !6, i64 152}
!10 = !{!"asn_TYPE_descriptor_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !6, i64 112, !11, i64 120, !6, i64 128, !6, i64 136, !11, i64 144, !6, i64 152}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 128}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"BIT_STRING_s", !6, i64 0, !11, i64 8, !11, i64 12, !16, i64 16}
!16 = !{!"asn_struct_ctx_s", !17, i64 0, !17, i64 2, !11, i64 4, !6, i64 8, !18, i64 16}
!17 = !{!"short", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!15, !11, i64 8}
!20 = !{!21, !18, i64 0}
!21 = !{!"asn_enc_rval_s", !18, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!21, !6, i64 8}
!23 = !{!21, !6, i64 16}
!24 = !{!25, !11, i64 0}
!25 = !{!"asn_per_constraint_s", !11, i64 0, !11, i64 4, !11, i64 8, !18, i64 16, !18, i64 24}
!26 = !{!27, !11, i64 8}
!27 = !{!"asn_OCTET_STRING_specifics_s", !11, i64 0, !11, i64 4, !11, i64 8}
!28 = !{!15, !11, i64 12}
!29 = !{!25, !11, i64 4}
!30 = !{!25, !11, i64 8}
!31 = !{!25, !18, i64 16}
!32 = !{!25, !18, i64 24}
!33 = !{i64 0, i64 8, !34, i64 8, i64 8, !5, i64 16, i64 8, !5}
!34 = !{!18, !18, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"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"

%struct.asn_OCTET_STRING_specifics_s = type { i32, i32, i32 }
%struct.asn_per_constraints_s = type { %struct.asn_per_constraint_s, %struct.asn_per_constraint_s, ptr, ptr }
%struct.asn_per_constraint_s = type { i32, i32, i32, i64, i64 }
%struct.asn_enc_rval_s = type { i64, ptr, ptr }

@asn_DEF_OCTET_STRING_specs = external hidden local_unnamed_addr constant %struct.asn_OCTET_STRING_specifics_s, align 4
@.str.3 = external hidden unnamed_addr constant [27 x i8], align 1
@asn_DEF_OCTET_STRING_constraints = external hidden local_unnamed_addr constant %struct.asn_per_constraints_s, align 8

; Function Attrs: nounwind uwtable
define dso_local void @OCTET_STRING_encode_uper(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.asn_enc_rval_s) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %1, i64 152
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %.not = icmp eq ptr %7, null
  %spec.select = select i1 %.not, ptr @asn_DEF_OCTET_STRING_specs, ptr %7
  %.not137 = icmp eq ptr %2, null
  br i1 %.not137, label %8, label %11

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %1, i64 128
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  br label %11

11:                                               ; preds = %5, %8
  %12 = phi ptr [ %10, %8 ], [ %2, %5 ]
  %.not138 = icmp eq ptr %3, null
  br i1 %.not138, label %18, label %13

13:                                               ; preds = %11
  %14 = load ptr, ptr %3, align 8, !tbaa !12
  %.not139 = icmp eq ptr %14, null
  br i1 %.not139, label %15, label %21

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %3, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !17
  %.not140 = icmp eq i32 %17, 0
  br i1 %.not140, label %21, label %18

18:                                               ; preds = %11, %15
  store i64 -1, ptr %0, align 8, !tbaa !18
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %19, align 8, !tbaa !20
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %20, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1718, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

21:                                               ; preds = %15, %13
  %.not141 = icmp eq ptr %12, null
  %22 = getelementptr inbounds i8, ptr %12, i64 32
  %.0115 = select i1 %.not141, ptr getelementptr inbounds (i8, ptr @asn_DEF_OCTET_STRING_constraints, i64 32), ptr %22
  %.0 = select i1 %.not141, ptr @asn_DEF_OCTET_STRING_constraints, ptr %12
  %23 = load i32, ptr %.0115, align 8, !tbaa !22
  %24 = and i32 %23, 4
  %25 = getelementptr inbounds i8, ptr %spec.select, i64 8
  %26 = load i32, ptr %25, align 4, !tbaa !24
  switch i32 %26, label %27 [
    i32 4, label %57
    i32 1, label %30
    i32 2, label %38
    i32 3, label %47
  ]

27:                                               ; preds = %21
  store i64 -1, ptr %0, align 8, !tbaa !18
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %28, align 8, !tbaa !20
  %29 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %29, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1733, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

30:                                               ; preds = %21
  %31 = getelementptr inbounds i8, ptr %3, i64 8
  %32 = load i32, ptr %31, align 8, !tbaa !17
  %33 = shl nsw i32 %32, 3
  %34 = getelementptr inbounds i8, ptr %3, i64 12
  %35 = load i32, ptr %34, align 4, !tbaa !26
  %36 = and i32 %35, 7
  %37 = sub nsw i32 %33, %36
  br label %67

38:                                               ; preds = %21
  %39 = load i32, ptr %.0, align 8, !tbaa !22
  %40 = and i32 %39, 2
  %.not143 = icmp eq i32 %40, 0
  br i1 %.not143, label %44, label %41

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %.0, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !27
  br label %44

44:                                               ; preds = %41, %38
  %.0126 = phi i32 [ %43, %41 ], [ 8, %38 ]
  %45 = getelementptr inbounds i8, ptr %3, i64 8
  %46 = load i32, ptr %45, align 8, !tbaa !17
  br label %67

47:                                               ; preds = %21
  %48 = load i32, ptr %.0, align 8, !tbaa !22
  %49 = and i32 %48, 2
  %.not142 = icmp eq i32 %49, 0
  br i1 %.not142, label %53, label %50

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %.0, i64 4
  %52 = load i32, ptr %51, align 4, !tbaa !27
  br label %53

53:                                               ; preds = %50, %47
  %.1127 = phi i32 [ %52, %50 ], [ 16, %47 ]
  %54 = getelementptr inbounds i8, ptr %3, i64 8
  %55 = load i32, ptr %54, align 8, !tbaa !17
  %56 = sdiv i32 %55, 2
  br label %67

57:                                               ; preds = %21
  %58 = load i32, ptr %.0, align 8, !tbaa !22
  %59 = and i32 %58, 2
  %.not144 = icmp eq i32 %59, 0
  br i1 %.not144, label %63, label %60

60:                                               ; preds = %57
  %61 = getelementptr inbounds i8, ptr %.0, i64 4
  %62 = load i32, ptr %61, align 4, !tbaa !27
  br label %63

63:                                               ; preds = %60, %57
  %.2128 = phi i32 [ %62, %60 ], [ 32, %57 ]
  %64 = getelementptr inbounds i8, ptr %3, i64 8
  %65 = load i32, ptr %64, align 8, !tbaa !17
  %66 = sdiv i32 %65, 4
  br label %67

67:                                               ; preds = %63, %53, %44, %30
  %.3 = phi i32 [ %.1127, %53 ], [ %.0126, %44 ], [ 1, %30 ], [ %.2128, %63 ]
  %.0125 = phi i32 [ 16, %53 ], [ 8, %44 ], [ 1, %30 ], [ 32, %63 ]
  %.0122 = phi i32 [ %56, %53 ], [ %46, %44 ], [ %37, %30 ], [ %66, %63 ]
  %.not149 = phi i1 [ false, %53 ], [ false, %44 ], [ true, %30 ], [ false, %63 ]
  %.0117 = phi i32 [ 2, %53 ], [ 1, %44 ], [ 0, %30 ], [ 4, %63 ]
  %68 = getelementptr inbounds i8, ptr %.0115, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !28
  %70 = icmp sgt i32 %69, -1
  br i1 %70, label %71, label %84

71:                                               ; preds = %67
  %72 = sext i32 %.0122 to i64
  %73 = getelementptr inbounds i8, ptr %.0115, i64 16
  %74 = load i64, ptr %73, align 8, !tbaa !29
  %75 = icmp sgt i64 %74, %72
  br i1 %75, label %80, label %76

76:                                               ; preds = %71
  %77 = getelementptr inbounds i8, ptr %.0115, i64 24
  %78 = load i64, ptr %77, align 8, !tbaa !30
  %79 = icmp slt i64 %78, %72
  br i1 %79, label %80, label %84

80:                                               ; preds = %76, %71
  %.not145 = icmp eq i32 %24, 0
  br i1 %.not145, label %81, label %.thread

81:                                               ; preds = %80
  store i64 -1, ptr %0, align 8, !tbaa !18
  %82 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %82, align 8, !tbaa !20
  %83 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %83, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1784, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

84:                                               ; preds = %67, %76
  %.not146 = icmp eq i32 %24, 0
  br i1 %.not146, label %89, label %.thread

.thread:                                          ; preds = %80, %84
  %.1165 = phi ptr [ %.0, %84 ], [ @asn_DEF_OCTET_STRING_constraints, %80 ]
  %.1116163 = phi ptr [ %.0115, %84 ], [ getelementptr inbounds (i8, ptr @asn_DEF_OCTET_STRING_constraints, i64 32), %80 ]
  %.4161 = phi i32 [ %.3, %84 ], [ %.0125, %80 ]
  %.0129160 = phi i32 [ 0, %84 ], [ 1, %80 ]
  %85 = tail call i32 @per_put_few_bits(ptr noundef %4, i32 noundef %.0129160, i32 noundef 1) #3
  %.not147 = icmp eq i32 %85, 0
  br i1 %.not147, label %.thread._crit_edge, label %86

.thread._crit_edge:                               ; preds = %.thread
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.1116163, i64 8
  %.pre = load i32, ptr %.phi.trans.insert, align 8, !tbaa !28
  br label %89

86:                                               ; preds = %.thread
  store i64 -1, ptr %0, align 8, !tbaa !18
  %87 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %87, align 8, !tbaa !20
  %88 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %88, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1794, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

89:                                               ; preds = %.thread._crit_edge, %84
  %90 = phi i32 [ %.pre, %.thread._crit_edge ], [ %69, %84 ]
  %.1166 = phi ptr [ %.1165, %.thread._crit_edge ], [ %.0, %84 ]
  %.1116164 = phi ptr [ %.1116163, %.thread._crit_edge ], [ %.0115, %84 ]
  %.4162 = phi i32 [ %.4161, %.thread._crit_edge ], [ %.3, %84 ]
  %91 = icmp sgt i32 %90, -1
  br i1 %91, label %92, label %118

92:                                               ; preds = %89
  %93 = zext i32 %.0122 to i64
  %94 = getelementptr inbounds i8, ptr %.1116164, i64 16
  %95 = load i64, ptr %94, align 8, !tbaa !29
  %96 = trunc i64 %95 to i32
  %97 = sub i32 %.0122, %96
  %98 = tail call i32 @per_put_few_bits(ptr noundef %4, i32 noundef %97, i32 noundef %90) #3
  %.not152 = icmp eq i32 %98, 0
  br i1 %.not152, label %102, label %99

99:                                               ; preds = %92
  store i64 -1, ptr %0, align 8, !tbaa !18
  %100 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %100, align 8, !tbaa !20
  %101 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %101, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1808, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

102:                                              ; preds = %92
  %103 = load ptr, ptr %3, align 8, !tbaa !12
  br i1 %.not149, label %110, label %104

104:                                              ; preds = %102
  %105 = getelementptr inbounds i8, ptr %.1166, i64 16
  %106 = load i64, ptr %105, align 8, !tbaa !29
  %107 = getelementptr inbounds i8, ptr %.1166, i64 24
  %108 = load i64, ptr %107, align 8, !tbaa !30
  %109 = tail call i32 @OCTET_STRING_per_put_characters(ptr noundef %4, ptr noundef %103, i64 noundef %93, i32 noundef %.0117, i32 noundef %.4162, i64 noundef %106, i64 noundef %108, ptr noundef %12)
  br label %113

110:                                              ; preds = %102
  %111 = mul i32 %.4162, %.0122
  %112 = tail call i32 @per_put_many_bits(ptr noundef %4, ptr noundef %103, i32 noundef %111) #3
  br label %113

113:                                              ; preds = %110, %104
  %.0118 = phi i32 [ %109, %104 ], [ %112, %110 ]
  %.not154 = icmp eq i32 %.0118, 0
  br i1 %.not154, label %117, label %114

114:                                              ; preds = %113
  store i64 -1, ptr %0, align 8, !tbaa !18
  %115 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %115, align 8, !tbaa !20
  %116 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %116, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1819, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

117:                                              ; preds = %113
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  br label %.thread167

118:                                              ; preds = %89
  %119 = icmp eq i32 %.0122, 0
  br i1 %119, label %120, label %126

120:                                              ; preds = %118
  %121 = tail call i64 @uper_put_length(ptr noundef %4, i64 noundef 0) #3
  %.not151 = icmp eq i64 %121, 0
  br i1 %.not151, label %125, label %122

122:                                              ; preds = %120
  store i64 -1, ptr %0, align 8, !tbaa !18
  %123 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %123, align 8, !tbaa !20
  %124 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %124, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1828, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

125:                                              ; preds = %120
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  br label %.thread167

126:                                              ; preds = %118
  %127 = load ptr, ptr %3, align 8, !tbaa !12
  %128 = getelementptr inbounds i8, ptr %.1166, i64 16
  %129 = getelementptr inbounds i8, ptr %.1166, i64 24
  %130 = zext nneg i32 %.0117 to i64
  br i1 %.not149, label %.split.us, label %.split

.split.us:                                        ; preds = %126, %138
  %.0120172.us = phi ptr [ %.1121.us, %138 ], [ %127, %126 ]
  %.1123171.us = phi i32 [ %140, %138 ], [ %.0122, %126 ]
  %131 = zext i32 %.1123171.us to i64
  %132 = tail call i64 @uper_put_length(ptr noundef %4, i64 noundef %131) #3
  %133 = icmp slt i64 %132, 0
  br i1 %133, label %.split174.us, label %134

134:                                              ; preds = %.split.us
  %135 = trunc i64 %132 to i32
  %136 = mul i32 %.4162, %135
  %137 = tail call i32 @per_put_many_bits(ptr noundef %4, ptr noundef %.0120172.us, i32 noundef %136) #3
  %.not150.us = icmp eq i32 %137, 0
  br i1 %.not150.us, label %138, label %.split176.us

138:                                              ; preds = %134
  %139 = lshr i64 %132, 3
  %.1121.us = getelementptr inbounds i8, ptr %.0120172.us, i64 %139
  %140 = sub i32 %.1123171.us, %135
  %.not148.us = icmp eq i32 %140, 0
  br i1 %.not148.us, label %.split178.us, label %.split.us, !llvm.loop !31

.split:                                           ; preds = %126, %152
  %.0120172 = phi ptr [ %.1121, %152 ], [ %127, %126 ]
  %.1123171 = phi i32 [ %155, %152 ], [ %.0122, %126 ]
  %141 = zext i32 %.1123171 to i64
  %142 = tail call i64 @uper_put_length(ptr noundef %4, i64 noundef %141) #3
  %143 = icmp slt i64 %142, 0
  br i1 %143, label %.split174.us, label %146

.split174.us:                                     ; preds = %.split, %.split.us
  store i64 -1, ptr %0, align 8, !tbaa !18
  %144 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %144, align 8, !tbaa !20
  %145 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %145, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1837, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

146:                                              ; preds = %.split
  %147 = load i64, ptr %128, align 8, !tbaa !29
  %148 = load i64, ptr %129, align 8, !tbaa !30
  %149 = tail call i32 @OCTET_STRING_per_put_characters(ptr noundef %4, ptr noundef %.0120172, i64 noundef %142, i32 noundef %.0117, i32 noundef %.4162, i64 noundef %147, i64 noundef %148, ptr noundef %12)
  %.not150 = icmp eq i32 %149, 0
  br i1 %.not150, label %152, label %.split176.us

.split176.us:                                     ; preds = %146, %134
  store i64 -1, ptr %0, align 8, !tbaa !18
  %150 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %150, align 8, !tbaa !20
  %151 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %151, align 8, !tbaa !21
  tail call void @stacktrace_create(ptr noundef nonnull @.str.3, i64 noundef 1851, i32 noundef 101, ptr noundef null) #3
  br label %.thread167

152:                                              ; preds = %146
  %153 = mul nuw nsw i64 %142, %130
  %.1121 = getelementptr inbounds i8, ptr %.0120172, i64 %153
  %154 = trunc i64 %142 to i32
  %155 = sub i32 %.1123171, %154
  %.not148 = icmp eq i32 %155, 0
  br i1 %.not148, label %.split178.us, label %.split, !llvm.loop !31

.split178.us:                                     ; preds = %152, %138
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  br label %.thread167

.thread167:                                       ; preds = %.split176.us, %.split174.us, %.split178.us, %125, %122, %117, %114, %99, %86, %81, %27, %18
  ret void
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @OCTET_STRING_per_put_characters(ptr noundef, ptr noundef, i64 noundef, i32 noundef, i32 noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

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

declare i64 @uper_put_length(ptr noundef, i64 noundef) local_unnamed_addr #1

; 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 = { 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 #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 = { 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 152}
!6 = !{!"asn_TYPE_descriptor_s", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !10, i64 104, !7, i64 112, !10, i64 120, !7, i64 128, !7, i64 136, !10, i64 144, !7, i64 152}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 128}
!12 = !{!13, !7, i64 0}
!13 = !{!"BIT_STRING_s", !7, i64 0, !10, i64 8, !10, i64 12, !14, i64 16}
!14 = !{!"asn_struct_ctx_s", !15, i64 0, !15, i64 2, !10, i64 4, !7, i64 8, !16, i64 16}
!15 = !{!"short", !8, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!13, !10, i64 8}
!18 = !{!19, !16, i64 0}
!19 = !{!"asn_enc_rval_s", !16, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!19, !7, i64 8}
!21 = !{!19, !7, i64 16}
!22 = !{!23, !10, i64 0}
!23 = !{!"asn_per_constraint_s", !10, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !16, i64 24}
!24 = !{!25, !10, i64 8}
!25 = !{!"asn_OCTET_STRING_specifics_s", !10, i64 0, !10, i64 4, !10, i64 8}
!26 = !{!13, !10, i64 12}
!27 = !{!23, !10, i64 4}
!28 = !{!23, !10, i64 8}
!29 = !{!23, !16, i64 16}
!30 = !{!23, !16, i64 24}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


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