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

; 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_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.ASN__PRIMITIVE_TYPE_s = type { ptr, 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_INTEGER_specifics_s = type { ptr, ptr, i32, i32, i32, i32, i32 }

@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @INTEGER_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 %struct.asn_enc_rval_s, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = 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) #4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %22, i32 0, i32 19
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  store ptr %24, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %25, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  store i64 0, ptr %16, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 0, ptr %17, align 8, !tbaa !12
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %33

28:                                               ; preds = %5
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 8, !tbaa !14
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %42

33:                                               ; preds = %28, %5
  br label %34

34:                                               ; preds = %33
  %35 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %35, align 8, !tbaa !16
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %36, ptr %37, align 8, !tbaa !18
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %38, ptr %39, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 801, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %329

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41, %28
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %49, label %45

45:                                               ; preds = %42
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %46, i32 0, i32 16
  %48 = load ptr, ptr %47, align 8, !tbaa !20
  store ptr %48, ptr %7, align 8, !tbaa !5
  br label %49

49:                                               ; preds = %45, %42
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %55

52:                                               ; preds = %49
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %53, i32 0, i32 0
  br label %56

55:                                               ; preds = %49
  br label %56

56:                                               ; preds = %55, %52
  %57 = phi ptr [ %54, %52 ], [ null, %55 ]
  store ptr %57, ptr %15, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %11, i32 0, i32 0
  store i64 0, ptr %58, align 8, !tbaa !16
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %211

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  store i32 0, ptr %19, align 4, !tbaa !21
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %121

64:                                               ; preds = %61
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %65, i32 0, i32 6
  %67 = load i32, ptr %66, align 8, !tbaa !22
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %121

69:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = call i32 @asn_INTEGER2ulong(ptr noundef %70, ptr noundef %20)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %82

73:                                               ; preds = %69
  br label %74

74:                                               ; preds = %73
  %75 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %75, align 8, !tbaa !16
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %76, ptr %77, align 8, !tbaa !18
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %78, ptr %79, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 816, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %118

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81, %69
  %83 = load ptr, ptr %15, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 8, !tbaa !24
  %86 = and i32 %85, 1
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %96

88:                                               ; preds = %82
  %89 = load i64, ptr %20, align 8, !tbaa !12
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %90, i32 0, i32 3
  %92 = load i64, ptr %91, align 8, !tbaa !26
  %93 = icmp ult i64 %89, %92
  br i1 %93, label %94, label %95

94:                                               ; preds = %88
  store i32 1, ptr %19, align 4, !tbaa !21
  br label %95

95:                                               ; preds = %94, %88
  br label %116

96:                                               ; preds = %82
  %97 = load ptr, ptr %15, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %97, i32 0, i32 1
  %99 = load i32, ptr %98, align 4, !tbaa !27
  %100 = icmp sge i32 %99, 0
  br i1 %100, label %101, label %115

101:                                              ; preds = %96
  %102 = load i64, ptr %20, align 8, !tbaa !12
  %103 = load ptr, ptr %15, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %103, i32 0, i32 3
  %105 = load i64, ptr %104, align 8, !tbaa !26
  %106 = icmp ult i64 %102, %105
  br i1 %106, label %113, label %107

107:                                              ; preds = %101
  %108 = load i64, ptr %20, align 8, !tbaa !12
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %109, i32 0, i32 4
  %111 = load i64, ptr %110, align 8, !tbaa !28
  %112 = icmp ugt i64 %108, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %107, %101
  store i32 1, ptr %19, align 4, !tbaa !21
  br label %114

114:                                              ; preds = %113, %107
  br label %115

115:                                              ; preds = %114, %96
  br label %116

116:                                              ; preds = %115, %95
  %117 = load i64, ptr %20, align 8, !tbaa !12
  store i64 %117, ptr %16, align 8, !tbaa !12
  store i32 0, ptr %18, align 4
  br label %118

118:                                              ; preds = %116, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  %119 = load i32, ptr %18, align 4
  switch i32 %119, label %208 [
    i32 0, label %120
  ]

120:                                              ; preds = %118
  br label %169

121:                                              ; preds = %64, %61
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = call i32 @asn_INTEGER2long(ptr noundef %122, ptr noundef %16)
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %134

125:                                              ; preds = %121
  br label %126

126:                                              ; preds = %125
  %127 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %127, align 8, !tbaa !16
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %128, ptr %129, align 8, !tbaa !18
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %130, ptr %131, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 836, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %208

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133, %121
  %135 = load ptr, ptr %15, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %135, i32 0, i32 0
  %137 = load i32, ptr %136, align 8, !tbaa !24
  %138 = and i32 %137, 1
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %148

140:                                              ; preds = %134
  %141 = load i64, ptr %16, align 8, !tbaa !12
  %142 = load ptr, ptr %15, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %142, i32 0, i32 3
  %144 = load i64, ptr %143, align 8, !tbaa !26
  %145 = icmp slt i64 %141, %144
  br i1 %145, label %146, label %147

146:                                              ; preds = %140
  store i32 1, ptr %19, align 4, !tbaa !21
  br label %147

147:                                              ; preds = %146, %140
  br label %168

148:                                              ; preds = %134
  %149 = load ptr, ptr %15, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %149, i32 0, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !27
  %152 = icmp sge i32 %151, 0
  br i1 %152, label %153, label %167

153:                                              ; preds = %148
  %154 = load i64, ptr %16, align 8, !tbaa !12
  %155 = load ptr, ptr %15, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %155, i32 0, i32 3
  %157 = load i64, ptr %156, align 8, !tbaa !26
  %158 = icmp slt i64 %154, %157
  br i1 %158, label %165, label %159

159:                                              ; preds = %153
  %160 = load i64, ptr %16, align 8, !tbaa !12
  %161 = load ptr, ptr %15, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %161, i32 0, i32 4
  %163 = load i64, ptr %162, align 8, !tbaa !28
  %164 = icmp sgt i64 %160, %163
  br i1 %164, label %165, label %166

165:                                              ; preds = %159, %153
  store i32 1, ptr %19, align 4, !tbaa !21
  br label %166

166:                                              ; preds = %165, %159
  br label %167

167:                                              ; preds = %166, %148
  br label %168

168:                                              ; preds = %167, %147
  br label %169

169:                                              ; preds = %168, %120
  %170 = load ptr, ptr %15, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %170, i32 0, i32 0
  %172 = load i32, ptr %171, align 8, !tbaa !24
  %173 = and i32 %172, 4
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %175, label %194

175:                                              ; preds = %169
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  %177 = load i32, ptr %19, align 4, !tbaa !21
  %178 = call i32 @per_put_few_bits(ptr noundef %176, i32 noundef %177, i32 noundef 1)
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %189

180:                                              ; preds = %175
  br label %181

181:                                              ; preds = %180
  %182 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %182, align 8, !tbaa !16
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %183, ptr %184, align 8, !tbaa !18
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %185, ptr %186, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 856, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %208

187:                                              ; No predecessors!
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188, %175
  %190 = load i32, ptr %19, align 4, !tbaa !21
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %193

192:                                              ; preds = %189
  store ptr null, ptr %15, align 8, !tbaa !5
  br label %193

193:                                              ; preds = %192, %189
  br label %207

194:                                              ; preds = %169
  %195 = load i32, ptr %19, align 4, !tbaa !21
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %206

197:                                              ; preds = %194
  br label %198

198:                                              ; preds = %197
  %199 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %199, align 8, !tbaa !16
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %200, ptr %201, align 8, !tbaa !18
  %202 = load ptr, ptr %8, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %202, ptr %203, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 862, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %208

204:                                              ; No predecessors!
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205, %194
  br label %207

207:                                              ; preds = %206, %193
  store i32 0, ptr %18, align 4
  br label %208

208:                                              ; preds = %207, %198, %181, %126, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  %209 = load i32, ptr %18, align 4
  switch i32 %209, label %329 [
    i32 0, label %210
  ]

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210, %56
  %212 = load ptr, ptr %15, align 8, !tbaa !5
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %247

214:                                              ; preds = %211
  %215 = load ptr, ptr %15, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %215, i32 0, i32 1
  %217 = load i32, ptr %216, align 4, !tbaa !27
  %218 = icmp sge i32 %217, 0
  br i1 %218, label %219, label %247

219:                                              ; preds = %214
  %220 = load i64, ptr %16, align 8, !tbaa !12
  %221 = load ptr, ptr %15, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %221, i32 0, i32 3
  %223 = load i64, ptr %222, align 8, !tbaa !26
  %224 = sub nsw i64 %220, %223
  store i64 %224, ptr %17, align 8, !tbaa !12
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = load i64, ptr %17, align 8, !tbaa !12
  %227 = load ptr, ptr %15, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %227, i32 0, i32 1
  %229 = load i32, ptr %228, align 4, !tbaa !27
  %230 = call i32 @uper_put_constrained_whole_number_u(ptr noundef %225, i64 noundef %226, i32 noundef %229)
  %231 = icmp ne i32 %230, 0
  br i1 %231, label %232, label %241

232:                                              ; preds = %219
  br label %233

233:                                              ; preds = %232
  %234 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %234, align 8, !tbaa !16
  %235 = load ptr, ptr %6, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %235, ptr %236, align 8, !tbaa !18
  %237 = load ptr, ptr %8, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %237, ptr %238, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 874, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %329

239:                                              ; No predecessors!
  br label %240

240:                                              ; preds = %239
  br label %241

241:                                              ; preds = %240, %219
  br label %242

242:                                              ; preds = %241
  %243 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %11, i32 0, i32 2
  store ptr null, ptr %243, align 8, !tbaa !19
  %244 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %11, i32 0, i32 1
  store ptr null, ptr %244, align 8, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %11, i64 24, i1 false), !tbaa.struct !29
  store i32 1, ptr %18, align 4
  br label %329

245:                                              ; No predecessors!
  br label %246

246:                                              ; preds = %245
  br label %247

247:                                              ; preds = %246, %214, %211
  %248 = load ptr, ptr %15, align 8, !tbaa !5
  %249 = icmp ne ptr %248, null
  br i1 %249, label %250, label %264

250:                                              ; preds = %247
  %251 = load ptr, ptr %15, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %251, i32 0, i32 3
  %253 = load i64, ptr %252, align 8, !tbaa !26
  %254 = icmp ne i64 %253, 0
  br i1 %254, label %255, label %264

255:                                              ; preds = %250
  br label %256

256:                                              ; preds = %255
  %257 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %257, align 8, !tbaa !16
  %258 = load ptr, ptr %6, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %258, ptr %259, align 8, !tbaa !18
  %260 = load ptr, ptr %8, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %260, ptr %261, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 882, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %329

262:                                              ; No predecessors!
  br label %263

263:                                              ; preds = %262
  br label %264

264:                                              ; preds = %263, %250, %247
  %265 = load ptr, ptr %12, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %265, i32 0, i32 0
  %267 = load ptr, ptr %266, align 8, !tbaa !30
  store ptr %267, ptr %13, align 8, !tbaa !5
  %268 = load ptr, ptr %12, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !30
  %271 = load ptr, ptr %12, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.ASN__PRIMITIVE_TYPE_s, ptr %271, i32 0, i32 1
  %273 = load i32, ptr %272, align 8, !tbaa !14
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds i8, ptr %270, i64 %274
  store ptr %275, ptr %14, align 8, !tbaa !5
  br label %276

276:                                              ; preds = %322, %264
  %277 = load ptr, ptr %13, align 8, !tbaa !5
  %278 = load ptr, ptr %14, align 8, !tbaa !5
  %279 = icmp ult ptr %277, %278
  br i1 %279, label %280, label %323

280:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %281 = load ptr, ptr %9, align 8, !tbaa !5
  %282 = load ptr, ptr %14, align 8, !tbaa !5
  %283 = load ptr, ptr %13, align 8, !tbaa !5
  %284 = ptrtoint ptr %282 to i64
  %285 = ptrtoint ptr %283 to i64
  %286 = sub i64 %284, %285
  %287 = call i64 @uper_put_length(ptr noundef %281, i64 noundef %286)
  store i64 %287, ptr %21, align 8, !tbaa !12
  %288 = load i64, ptr %21, align 8, !tbaa !12
  %289 = icmp slt i64 %288, 0
  br i1 %289, label %290, label %299

290:                                              ; preds = %280
  br label %291

291:                                              ; preds = %290
  %292 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %292, align 8, !tbaa !16
  %293 = load ptr, ptr %6, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %293, ptr %294, align 8, !tbaa !18
  %295 = load ptr, ptr %8, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %295, ptr %296, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 888, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %320

297:                                              ; No predecessors!
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298, %280
  %300 = load ptr, ptr %9, align 8, !tbaa !5
  %301 = load ptr, ptr %13, align 8, !tbaa !5
  %302 = load i64, ptr %21, align 8, !tbaa !12
  %303 = mul nsw i64 8, %302
  %304 = trunc i64 %303 to i32
  %305 = call i32 @per_put_many_bits(ptr noundef %300, ptr noundef %301, i32 noundef %304)
  %306 = icmp ne i32 %305, 0
  br i1 %306, label %307, label %316

307:                                              ; preds = %299
  br label %308

308:                                              ; preds = %307
  %309 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 0
  store i64 -1, ptr %309, align 8, !tbaa !16
  %310 = load ptr, ptr %6, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 1
  store ptr %310, ptr %311, align 8, !tbaa !18
  %312 = load ptr, ptr %8, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %0, i32 0, i32 2
  store ptr %312, ptr %313, align 8, !tbaa !19
  call void @stacktrace_create(ptr noundef @.str.2, i64 noundef 891, i32 noundef 101, ptr noundef null)
  store i32 1, ptr %18, align 4
  br label %320

314:                                              ; No predecessors!
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315, %299
  %317 = load i64, ptr %21, align 8, !tbaa !12
  %318 = load ptr, ptr %13, align 8, !tbaa !5
  %319 = getelementptr inbounds i8, ptr %318, i64 %317
  store ptr %319, ptr %13, align 8, !tbaa !5
  store i32 0, ptr %18, align 4
  br label %320

320:                                              ; preds = %316, %308, %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  %321 = load i32, ptr %18, align 4
  switch i32 %321, label %329 [
    i32 0, label %322
  ]

322:                                              ; preds = %320
  br label %276, !llvm.loop !31

323:                                              ; preds = %276
  br label %324

324:                                              ; preds = %323
  %325 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %11, i32 0, i32 2
  store ptr null, ptr %325, align 8, !tbaa !19
  %326 = getelementptr inbounds %struct.asn_enc_rval_s, ptr %11, i32 0, i32 1
  store ptr null, ptr %326, align 8, !tbaa !18
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %11, i64 24, i1 false), !tbaa.struct !29
  store i32 1, ptr %18, align 4
  br label %329

327:                                              ; No predecessors!
  br label %328

328:                                              ; preds = %327
  store i32 0, ptr %18, align 4
  br label %329

329:                                              ; preds = %328, %324, %320, %256, %242, %233, %208, %34
  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 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %330 = load i32, ptr %18, align 4
  switch i32 %330, label %332 [
    i32 0, label %331
    i32 1, label %331
  ]

331:                                              ; preds = %329, %329
  ret void

332:                                              ; preds = %329
  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 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) #2

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

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

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

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

declare i32 @uper_put_constrained_whole_number_u(ptr noundef, i64 noundef, i32 noundef) #2

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

declare i32 @per_put_many_bits(ptr noundef, ptr noundef, i32 noundef) #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 = { nocallback nofree nosync 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !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 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !11, i64 8}
!15 = !{!"ASN__PRIMITIVE_TYPE_s", !6, i64 0, !11, i64 8}
!16 = !{!17, !13, i64 0}
!17 = !{!"asn_enc_rval_s", !13, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!17, !6, i64 8}
!19 = !{!17, !6, i64 16}
!20 = !{!10, !6, i64 128}
!21 = !{!11, !11, i64 0}
!22 = !{!23, !11, i64 32}
!23 = !{!"asn_INTEGER_specifics_s", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32}
!24 = !{!25, !11, i64 0}
!25 = !{!"asn_per_constraint_s", !11, i64 0, !11, i64 4, !11, i64 8, !13, i64 16, !13, i64 24}
!26 = !{!25, !13, i64 16}
!27 = !{!25, !11, i64 4}
!28 = !{!25, !13, i64 24}
!29 = !{i64 0, i64 8, !12, i64 8, i64 8, !5, i64 16, i64 8, !5}
!30 = !{!15, !6, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"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_enc_rval_s = type { i64, ptr, ptr }

@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @INTEGER_encode_uper(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.asn_enc_rval_s) align 8 %0, ptr noundef %1, ptr noundef readonly %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = getelementptr inbounds i8, ptr %1, i64 152
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store i64 0, ptr %6, align 8, !tbaa !11
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %14, label %10

10:                                               ; preds = %5
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !13
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %17

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

17:                                               ; preds = %10
  %.not94 = icmp eq ptr %2, null
  br i1 %.not94, label %18, label %.thread

18:                                               ; preds = %17
  %19 = getelementptr inbounds i8, ptr %1, i64 128
  %20 = load ptr, ptr %19, align 8, !tbaa !19
  %.not95 = icmp eq ptr %20, null
  br i1 %.not95, label %.critedge, label %.thread

.thread:                                          ; preds = %17, %18
  %.0114 = phi ptr [ %20, %18 ], [ %2, %17 ]
  %.not96 = icmp eq ptr %9, null
  br i1 %.not96, label %51, label %21

21:                                               ; preds = %.thread
  %22 = getelementptr inbounds i8, ptr %9, i64 32
  %23 = load i32, ptr %22, align 8, !tbaa !20
  %.not97 = icmp eq i32 %23, 0
  br i1 %.not97, label %51, label %24

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %25 = call i32 @asn_INTEGER2ulong(ptr noundef nonnull %3, ptr noundef nonnull %7)
  %.not100 = icmp eq i32 %25, 0
  br i1 %.not100, label %26, label %48

26:                                               ; preds = %24
  %27 = load i32, ptr %.0114, align 8, !tbaa !22
  %28 = and i32 %27, 1
  %.not101 = icmp eq i32 %28, 0
  br i1 %.not101, label %34, label %29

29:                                               ; preds = %26
  %30 = load i64, ptr %7, align 8, !tbaa !11
  %31 = getelementptr inbounds i8, ptr %.0114, i64 16
  %32 = load i64, ptr %31, align 8, !tbaa !24
  %33 = icmp ult i64 %30, %32
  %spec.select = zext i1 %33 to i32
  br label %.thread115

34:                                               ; preds = %26
  %35 = getelementptr inbounds i8, ptr %.0114, i64 4
  %36 = load i32, ptr %35, align 4, !tbaa !25
  %37 = icmp sgt i32 %36, -1
  %.pre = load i64, ptr %7, align 8, !tbaa !11
  br i1 %37, label %38, label %.thread115

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %.0114, i64 16
  %40 = load i64, ptr %39, align 8, !tbaa !24
  %41 = icmp ult i64 %.pre, %40
  br i1 %41, label %46, label %42

42:                                               ; preds = %38
  %43 = getelementptr inbounds i8, ptr %.0114, i64 24
  %44 = load i64, ptr %43, align 8, !tbaa !26
  %45 = icmp ugt i64 %.pre, %44
  br i1 %45, label %46, label %.thread115

46:                                               ; preds = %42, %38
  br label %.thread115

.thread115:                                       ; preds = %42, %46, %34, %29
  %47 = phi i64 [ %.pre, %46 ], [ %.pre, %42 ], [ %.pre, %34 ], [ %30, %29 ]
  %.077 = phi i32 [ 1, %46 ], [ 0, %42 ], [ 0, %34 ], [ %spec.select, %29 ]
  store i64 %47, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %77

48:                                               ; preds = %24
  store i64 -1, ptr %0, align 8, !tbaa !15
  %49 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %49, align 8, !tbaa !17
  %50 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %50, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 816, i32 noundef 101, ptr noundef null) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %.thread125

51:                                               ; preds = %21, %.thread
  %52 = call i32 @asn_INTEGER2long(ptr noundef nonnull %3, ptr noundef nonnull %6)
  %.not98 = icmp eq i32 %52, 0
  br i1 %.not98, label %56, label %53

53:                                               ; preds = %51
  store i64 -1, ptr %0, align 8, !tbaa !15
  %54 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %54, align 8, !tbaa !17
  %55 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %55, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 836, i32 noundef 101, ptr noundef null) #4
  br label %.thread125

56:                                               ; preds = %51
  %57 = load i32, ptr %.0114, align 8, !tbaa !22
  %58 = and i32 %57, 1
  %.not99 = icmp eq i32 %58, 0
  br i1 %.not99, label %64, label %59

59:                                               ; preds = %56
  %60 = load i64, ptr %6, align 8, !tbaa !11
  %61 = getelementptr inbounds i8, ptr %.0114, i64 16
  %62 = load i64, ptr %61, align 8, !tbaa !24
  %63 = icmp slt i64 %60, %62
  %spec.select110 = zext i1 %63 to i32
  br label %77

64:                                               ; preds = %56
  %65 = getelementptr inbounds i8, ptr %.0114, i64 4
  %66 = load i32, ptr %65, align 4, !tbaa !25
  %67 = icmp sgt i32 %66, -1
  br i1 %67, label %68, label %77

68:                                               ; preds = %64
  %69 = load i64, ptr %6, align 8, !tbaa !11
  %70 = getelementptr inbounds i8, ptr %.0114, i64 16
  %71 = load i64, ptr %70, align 8, !tbaa !24
  %72 = icmp slt i64 %69, %71
  br i1 %72, label %.thread117, label %73

73:                                               ; preds = %68
  %74 = getelementptr inbounds i8, ptr %.0114, i64 24
  %75 = load i64, ptr %74, align 8, !tbaa !26
  %76 = icmp sgt i64 %69, %75
  br i1 %76, label %.thread117, label %77

77:                                               ; preds = %.thread115, %59, %73, %64
  %78 = phi i32 [ %57, %73 ], [ %57, %64 ], [ %57, %59 ], [ %27, %.thread115 ]
  %.2 = phi i32 [ 0, %73 ], [ 0, %64 ], [ %spec.select110, %59 ], [ %.077, %.thread115 ]
  %79 = and i32 %78, 4
  %.not102 = icmp eq i32 %79, 0
  br i1 %.not102, label %88, label %81

.thread117:                                       ; preds = %68, %73
  %80 = and i32 %57, 4
  %.not102119 = icmp eq i32 %80, 0
  br i1 %.not102119, label %.thread122, label %.thread136

81:                                               ; preds = %77
  %82 = call i32 @per_put_few_bits(ptr noundef %4, i32 noundef %.2, i32 noundef 1) #4
  %.not104 = icmp eq i32 %82, 0
  br i1 %.not104, label %87, label %84

.thread136:                                       ; preds = %.thread117
  %83 = call i32 @per_put_few_bits(ptr noundef %4, i32 noundef 1, i32 noundef 1) #4
  %.not104138 = icmp eq i32 %83, 0
  br i1 %.not104138, label %.critedge, label %84

84:                                               ; preds = %.thread136, %81
  store i64 -1, ptr %0, align 8, !tbaa !15
  %85 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %85, align 8, !tbaa !17
  %86 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %86, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 856, i32 noundef 101, ptr noundef null) #4
  br label %.thread125

87:                                               ; preds = %81
  %.not105 = icmp eq i32 %.2, 0
  br i1 %.not105, label %select.unfold, label %.critedge

88:                                               ; preds = %77
  %.not103 = icmp eq i32 %.2, 0
  br i1 %.not103, label %select.unfold, label %.thread122

.thread122:                                       ; preds = %.thread117, %88
  store i64 -1, ptr %0, align 8, !tbaa !15
  %89 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %89, align 8, !tbaa !17
  %90 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %90, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 862, i32 noundef 101, ptr noundef null) #4
  br label %.thread125

select.unfold:                                    ; preds = %87, %88
  %91 = getelementptr inbounds i8, ptr %.0114, i64 4
  %92 = load i32, ptr %91, align 4, !tbaa !25
  %93 = icmp sgt i32 %92, -1
  br i1 %93, label %94, label %104

94:                                               ; preds = %select.unfold
  %95 = load i64, ptr %6, align 8, !tbaa !11
  %96 = getelementptr inbounds i8, ptr %.0114, i64 16
  %97 = load i64, ptr %96, align 8, !tbaa !24
  %98 = sub nsw i64 %95, %97
  %99 = call i32 @uper_put_constrained_whole_number_u(ptr noundef %4, i64 noundef %98, i32 noundef %92) #4
  %.not109 = icmp eq i32 %99, 0
  br i1 %.not109, label %103, label %100

100:                                              ; preds = %94
  store i64 -1, ptr %0, align 8, !tbaa !15
  %101 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %101, align 8, !tbaa !17
  %102 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %102, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 874, i32 noundef 101, ptr noundef null) #4
  br label %.thread125

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

104:                                              ; preds = %select.unfold
  %105 = getelementptr inbounds i8, ptr %.0114, i64 16
  %106 = load i64, ptr %105, align 8, !tbaa !24
  %.not107 = icmp eq i64 %106, 0
  br i1 %.not107, label %.critedge, label %107

107:                                              ; preds = %104
  store i64 -1, ptr %0, align 8, !tbaa !15
  %108 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %108, align 8, !tbaa !17
  %109 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %109, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 882, i32 noundef 101, ptr noundef null) #4
  br label %.thread125

.critedge:                                        ; preds = %.thread136, %87, %18, %104
  %110 = load ptr, ptr %3, align 8, !tbaa !27
  %111 = load i32, ptr %11, align 8, !tbaa !13
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i8, ptr %110, i64 %112
  %114 = icmp sgt i32 %111, 0
  br i1 %114, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.critedge
  %115 = ptrtoint ptr %113 to i64
  br label %116

116:                                              ; preds = %.lr.ph, %130
  %.084143 = phi ptr [ %110, %.lr.ph ], [ %131, %130 ]
  %117 = ptrtoint ptr %.084143 to i64
  %118 = sub i64 %115, %117
  %119 = call i64 @uper_put_length(ptr noundef %4, i64 noundef %118) #4
  %120 = icmp slt i64 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %116
  store i64 -1, ptr %0, align 8, !tbaa !15
  %122 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %122, align 8, !tbaa !17
  %123 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %123, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 888, i32 noundef 101, ptr noundef null) #4
  br label %.thread125

124:                                              ; preds = %116
  %.tr = trunc i64 %119 to i32
  %125 = shl i32 %.tr, 3
  %126 = call i32 @per_put_many_bits(ptr noundef %4, ptr noundef %.084143, i32 noundef %125) #4
  %.not108 = icmp eq i32 %126, 0
  br i1 %.not108, label %130, label %127

127:                                              ; preds = %124
  store i64 -1, ptr %0, align 8, !tbaa !15
  %128 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %1, ptr %128, align 8, !tbaa !17
  %129 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %3, ptr %129, align 8, !tbaa !18
  call void @stacktrace_create(ptr noundef nonnull @.str.2, i64 noundef 891, i32 noundef 101, ptr noundef null) #4
  br label %.thread125

130:                                              ; preds = %124
  %131 = getelementptr inbounds i8, ptr %.084143, i64 %119
  %132 = icmp ult ptr %131, %113
  br i1 %132, label %116, label %._crit_edge, !llvm.loop !28

._crit_edge:                                      ; preds = %130, %.critedge
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  br label %.thread125

.thread125:                                       ; preds = %127, %121, %53, %48, %.thread122, %84, %._crit_edge, %107, %103, %100, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret void
}

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

; Function Attrs: mustprogress 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) local_unnamed_addr #2

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

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

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

declare i32 @uper_put_constrained_whole_number_u(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { mustprogress nocallback nofree nosync 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !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 = !{!12, !12, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"ASN__PRIMITIVE_TYPE_s", !7, i64 0, !10, i64 8}
!15 = !{!16, !12, i64 0}
!16 = !{!"asn_enc_rval_s", !12, i64 0, !7, i64 8, !7, i64 16}
!17 = !{!16, !7, i64 8}
!18 = !{!16, !7, i64 16}
!19 = !{!6, !7, i64 128}
!20 = !{!21, !10, i64 32}
!21 = !{!"asn_INTEGER_specifics_s", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32}
!22 = !{!23, !10, i64 0}
!23 = !{!"asn_per_constraint_s", !10, i64 0, !10, i64 4, !10, i64 8, !12, i64 16, !12, i64 24}
!24 = !{!23, !12, i64 16}
!25 = !{!23, !10, i64 4}
!26 = !{!23, !12, i64 24}
!27 = !{!14, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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