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

; 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_dec_rval_s = type { i32, i64 }
%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_CHOICE_specifics_s = type { i32, i32, i32, i32, ptr, i32, 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_TYPE_member_s = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr }

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

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #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) #0

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

; Function Attrs: nounwind uwtable
declare hidden void @_set_present_idx(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

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

31:                                               ; preds = %5
  br label %32

32:                                               ; preds = %31
  %33 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %33, align 8, !tbaa !12
  %34 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %34, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 930, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

35:                                               ; No predecessors!
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36, %5
  %38 = load ptr, ptr %18, align 8, !tbaa !5
  %39 = icmp ne ptr %38, null
  br i1 %39, label %56, label %40

40:                                               ; preds = %37
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.asn_CHOICE_specifics_s, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !16
  %44 = sext i32 %43 to i64
  %45 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %44) #6
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %45, ptr %46, align 8, !tbaa !5
  store ptr %45, ptr %18, align 8, !tbaa !5
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %55, label %49

49:                                               ; preds = %40
  br label %50

50:                                               ; preds = %49
  %51 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %51, align 8, !tbaa !12
  %52 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %52, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 939, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

53:                                               ; No predecessors!
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54, %40
  br label %56

56:                                               ; preds = %55, %37
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %62

59:                                               ; preds = %56
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %60, i32 0, i32 0
  store ptr %61, ptr %14, align 8, !tbaa !5
  br label %74

62:                                               ; preds = %56
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %63, i32 0, i32 16
  %65 = load ptr, ptr %64, align 8, !tbaa !18
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %72

67:                                               ; preds = %62
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %68, i32 0, i32 16
  %70 = load ptr, ptr %69, align 8, !tbaa !18
  %71 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %70, i32 0, i32 0
  store ptr %71, ptr %14, align 8, !tbaa !5
  br label %73

72:                                               ; preds = %62
  store ptr null, ptr %14, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %72, %67
  br label %74

74:                                               ; preds = %73, %59
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = icmp ne ptr %75, null
  br i1 %76, label %77, label %99

77:                                               ; preds = %74
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %78, i32 0, i32 0
  %80 = load i32, ptr %79, align 8, !tbaa !19
  %81 = and i32 %80, 4
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %99

83:                                               ; preds = %77
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = call i32 @per_get_few_bits(ptr noundef %84, i32 noundef 1)
  store i32 %85, ptr %19, align 4, !tbaa !21
  %86 = load i32, ptr %19, align 4, !tbaa !21
  %87 = icmp slt i32 %86, 0
  br i1 %87, label %88, label %94

88:                                               ; preds = %83
  br label %89

89:                                               ; preds = %88
  %90 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %90, align 8, !tbaa !12
  %91 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %91, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 954, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

92:                                               ; No predecessors!
  br label %93

93:                                               ; preds = %92
  br label %94

94:                                               ; preds = %93, %83
  %95 = load i32, ptr %19, align 4, !tbaa !21
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %98

97:                                               ; preds = %94
  store ptr null, ptr %14, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %97, %94
  br label %99

99:                                               ; preds = %98, %77, %74
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %135

102:                                              ; preds = %99
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !22
  %106 = icmp sge i32 %105, 0
  br i1 %106, label %107, label %135

107:                                              ; preds = %102
  %108 = load ptr, ptr %11, align 8, !tbaa !5
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !22
  %112 = call i32 @per_get_few_bits(ptr noundef %108, i32 noundef %111)
  store i32 %112, ptr %19, align 4, !tbaa !21
  %113 = load i32, ptr %19, align 4, !tbaa !21
  %114 = icmp slt i32 %113, 0
  br i1 %114, label %115, label %121

115:                                              ; preds = %107
  br label %116

116:                                              ; preds = %115
  %117 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %117, align 8, !tbaa !12
  %118 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %118, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 964, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120, %107
  %122 = load i32, ptr %19, align 4, !tbaa !21
  %123 = sext i32 %122 to i64
  %124 = load ptr, ptr %14, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %124, i32 0, i32 4
  %126 = load i64, ptr %125, align 8, !tbaa !23
  %127 = icmp sgt i64 %123, %126
  br i1 %127, label %128, label %134

128:                                              ; preds = %121
  br label %129

129:                                              ; preds = %128
  %130 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %130, align 8, !tbaa !12
  %131 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %131, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 969, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133, %121
  br label %176

135:                                              ; preds = %102, %99
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.asn_CHOICE_specifics_s, ptr %136, i32 0, i32 7
  %138 = load i32, ptr %137, align 8, !tbaa !24
  %139 = icmp eq i32 %138, -1
  br i1 %139, label %140, label %146

140:                                              ; preds = %135
  br label %141

141:                                              ; preds = %140
  %142 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %142, align 8, !tbaa !12
  %143 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %143, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 973, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

144:                                              ; No predecessors!
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145, %135
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = call i64 @uper_get_nsnnwn(ptr noundef %147)
  %149 = trunc i64 %148 to i32
  store i32 %149, ptr %19, align 4, !tbaa !21
  %150 = load i32, ptr %19, align 4, !tbaa !21
  %151 = icmp slt i32 %150, 0
  br i1 %151, label %152, label %158

152:                                              ; preds = %146
  br label %153

153:                                              ; preds = %152
  %154 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %154, align 8, !tbaa !12
  %155 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %155, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 977, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

156:                                              ; No predecessors!
  br label %157

157:                                              ; preds = %156
  br label %158

158:                                              ; preds = %157, %146
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.asn_CHOICE_specifics_s, ptr %159, i32 0, i32 7
  %161 = load i32, ptr %160, align 8, !tbaa !24
  %162 = load i32, ptr %19, align 4, !tbaa !21
  %163 = add nsw i32 %162, %161
  store i32 %163, ptr %19, align 4, !tbaa !21
  %164 = load i32, ptr %19, align 4, !tbaa !21
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %165, i32 0, i32 18
  %167 = load i32, ptr %166, align 8, !tbaa !25
  %168 = icmp sge i32 %164, %167
  br i1 %168, label %169, label %175

169:                                              ; preds = %158
  br label %170

170:                                              ; preds = %169
  %171 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %171, align 8, !tbaa !12
  %172 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %172, align 8, !tbaa !15
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 981, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %273

173:                                              ; No predecessors!
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174, %158
  br label %176

176:                                              ; preds = %175, %134
  %177 = load ptr, ptr %12, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.asn_CHOICE_specifics_s, ptr %177, i32 0, i32 6
  %179 = load ptr, ptr %178, align 8, !tbaa !26
  %180 = icmp ne ptr %179, null
  br i1 %180, label %181, label %189

181:                                              ; preds = %176
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.asn_CHOICE_specifics_s, ptr %182, i32 0, i32 6
  %184 = load ptr, ptr %183, align 8, !tbaa !26
  %185 = load i32, ptr %19, align 4, !tbaa !21
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i32, ptr %184, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !21
  store i32 %188, ptr %19, align 4, !tbaa !21
  br label %189

189:                                              ; preds = %181, %176
  %190 = load ptr, ptr %18, align 8, !tbaa !5
  %191 = load ptr, ptr %12, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.asn_CHOICE_specifics_s, ptr %191, i32 0, i32 2
  %193 = load i32, ptr %192, align 8, !tbaa !27
  %194 = load ptr, ptr %12, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.asn_CHOICE_specifics_s, ptr %194, i32 0, i32 3
  %196 = load i32, ptr %195, align 4, !tbaa !28
  %197 = load i32, ptr %19, align 4, !tbaa !21
  %198 = add nsw i32 %197, 1
  call void @_set_present_idx(ptr noundef %190, i32 noundef %193, i32 noundef %196, i32 noundef %198)
  %199 = load ptr, ptr %8, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %199, i32 0, i32 17
  %201 = load ptr, ptr %200, align 8, !tbaa !29
  %202 = load i32, ptr %19, align 4, !tbaa !21
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %201, i64 %203
  store ptr %204, ptr %15, align 8, !tbaa !5
  %205 = load ptr, ptr %15, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %205, i32 0, i32 0
  %207 = load i32, ptr %206, align 8, !tbaa !30
  %208 = and i32 %207, 1
  %209 = icmp ne i32 %208, 0
  br i1 %209, label %210, label %217

210:                                              ; preds = %189
  %211 = load ptr, ptr %18, align 8, !tbaa !5
  %212 = load ptr, ptr %15, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %212, i32 0, i32 2
  %214 = load i32, ptr %213, align 8, !tbaa !32
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds i8, ptr %211, i64 %215
  store ptr %216, ptr %17, align 8, !tbaa !5
  br label %224

217:                                              ; preds = %189
  %218 = load ptr, ptr %18, align 8, !tbaa !5
  %219 = load ptr, ptr %15, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %219, i32 0, i32 2
  %221 = load i32, ptr %220, align 8, !tbaa !32
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds i8, ptr %218, i64 %222
  store ptr %223, ptr %16, align 8, !tbaa !5
  store ptr %16, ptr %17, align 8, !tbaa !5
  br label %224

224:                                              ; preds = %217, %210
  %225 = load ptr, ptr %14, align 8, !tbaa !5
  %226 = icmp ne ptr %225, null
  br i1 %226, label %227, label %252

227:                                              ; preds = %224
  %228 = load ptr, ptr %14, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %228, i32 0, i32 1
  %230 = load i32, ptr %229, align 4, !tbaa !22
  %231 = icmp sge i32 %230, 0
  br i1 %231, label %232, label %252

232:                                              ; preds = %227
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %233 = load ptr, ptr %15, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %233, i32 0, i32 5
  %235 = load ptr, ptr %234, align 8, !tbaa !33
  %236 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %235, i32 0, i32 9
  %237 = load ptr, ptr %236, align 8, !tbaa !34
  %238 = load ptr, ptr %7, align 8, !tbaa !5
  %239 = load ptr, ptr %15, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %239, i32 0, i32 5
  %241 = load ptr, ptr %240, align 8, !tbaa !33
  %242 = load ptr, ptr %15, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %242, i32 0, i32 7
  %244 = load ptr, ptr %243, align 8, !tbaa !35
  %245 = load ptr, ptr %17, align 8, !tbaa !5
  %246 = load ptr, ptr %11, align 8, !tbaa !5
  %247 = call { i32, i64 } %237(ptr noundef %238, ptr noundef %241, ptr noundef %244, ptr noundef %245, ptr noundef %246)
  %248 = getelementptr inbounds { i32, i64 }, ptr %21, i32 0, i32 0
  %249 = extractvalue { i32, i64 } %247, 0
  store i32 %249, ptr %248, align 8
  %250 = getelementptr inbounds { i32, i64 }, ptr %21, i32 0, i32 1
  %251 = extractvalue { i32, i64 } %247, 1
  store i64 %251, ptr %250, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %267

252:                                              ; preds = %227, %224
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %253 = load ptr, ptr %7, align 8, !tbaa !5
  %254 = load ptr, ptr %15, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %254, i32 0, i32 5
  %256 = load ptr, ptr %255, align 8, !tbaa !33
  %257 = load ptr, ptr %15, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %257, i32 0, i32 7
  %259 = load ptr, ptr %258, align 8, !tbaa !35
  %260 = load ptr, ptr %17, align 8, !tbaa !5
  %261 = load ptr, ptr %11, align 8, !tbaa !5
  %262 = call { i32, i64 } @uper_open_type_get(ptr noundef %253, ptr noundef %256, ptr noundef %259, ptr noundef %260, ptr noundef %261)
  %263 = getelementptr inbounds { i32, i64 }, ptr %22, i32 0, i32 0
  %264 = extractvalue { i32, i64 } %262, 0
  store i32 %264, ptr %263, align 8
  %265 = getelementptr inbounds { i32, i64 }, ptr %22, i32 0, i32 1
  %266 = extractvalue { i32, i64 } %262, 1
  store i64 %266, ptr %265, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !36
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %267

267:                                              ; preds = %252, %232
  %268 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %13, i32 0, i32 0
  %269 = load i32, ptr %268, align 8, !tbaa !12
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %272

271:                                              ; preds = %267
  br label %272

272:                                              ; preds = %271, %267
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !36
  store i32 1, ptr %20, align 4
  br label %273

273:                                              ; preds = %272, %170, %153, %141, %129, %116, %89, %50, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %274 = load { i32, i64 }, ptr %6, align 8
  ret { i32, i64 } %274
}

; Function Attrs: nounwind uwtable
declare hidden i32 @ASN__STACK_OVERFLOW_CHECK(ptr noundef) #4

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

declare i64 @uper_get_nsnnwn(ptr noundef) #3

declare { i32, i64 } @uper_open_type_get(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0,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: 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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind allocsize(0,1) }

!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, !11, i64 0}
!13 = !{!"asn_dec_rval_s", !11, i64 0, !14, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !14, i64 8}
!16 = !{!17, !11, i64 0}
!17 = !{!"asn_CHOICE_specifics_s", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !6, i64 16, !11, i64 24, !6, i64 32, !11, i64 40}
!18 = !{!10, !6, i64 128}
!19 = !{!20, !11, i64 0}
!20 = !{!"asn_per_constraint_s", !11, i64 0, !11, i64 4, !11, i64 8, !14, i64 16, !14, i64 24}
!21 = !{!11, !11, i64 0}
!22 = !{!20, !11, i64 4}
!23 = !{!20, !14, i64 24}
!24 = !{!17, !11, i64 40}
!25 = !{!10, !11, i64 144}
!26 = !{!17, !6, i64 32}
!27 = !{!17, !11, i64 8}
!28 = !{!17, !11, i64 12}
!29 = !{!10, !6, i64 136}
!30 = !{!31, !11, i64 0}
!31 = !{!"asn_TYPE_member_s", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!32 = !{!31, !11, i64 8}
!33 = !{!31, !6, i64 24}
!34 = !{!10, !6, i64 72}
!35 = !{!31, !6, i64 40}
!36 = !{i64 0, i64 4, !21, i64 8, i64 8, !37}
!37 = !{!14, !14, i64 0}


; 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_TYPE_member_s = type { i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare hidden void @_set_present_idx(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local { i32, i64 } @CHOICE_decode_uper(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef readonly %2, ptr nocapture noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca ptr, align 8
  %7 = getelementptr inbounds i8, ptr %1, i64 152
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %9 = load ptr, ptr %3, align 8, !tbaa !11
  %10 = tail call i32 @ASN__STACK_OVERFLOW_CHECK(ptr noundef %0)
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %12, label %11

11:                                               ; preds = %5
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 930, i32 noundef 102, ptr noundef null) #4
  br label %101

12:                                               ; preds = %5
  %.not76 = icmp eq ptr %9, null
  br i1 %.not76, label %13, label %18

13:                                               ; preds = %12
  %14 = load i32, ptr %8, align 8, !tbaa !12
  %15 = sext i32 %14 to i64
  %16 = tail call noalias ptr @calloc(i64 noundef 1, i64 noundef %15) #5
  store ptr %16, ptr %3, align 8, !tbaa !11
  %.not77 = icmp eq ptr %16, null
  br i1 %.not77, label %17, label %18

17:                                               ; preds = %13
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 939, i32 noundef 102, ptr noundef null) #4
  br label %101

18:                                               ; preds = %13, %12
  %.064 = phi ptr [ %9, %12 ], [ %16, %13 ]
  %.not78 = icmp eq ptr %2, null
  br i1 %.not78, label %19, label %.thread

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

.thread:                                          ; preds = %18, %19
  %.090 = phi ptr [ %21, %19 ], [ %2, %18 ]
  %22 = load i32, ptr %.090, align 8, !tbaa !15
  %23 = and i32 %22, 4
  %.not81 = icmp eq i32 %23, 0
  br i1 %.not81, label %select.unfold, label %24

24:                                               ; preds = %.thread
  %25 = tail call i32 @per_get_few_bits(ptr noundef %4, i32 noundef 1) #4
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 954, i32 noundef 100, ptr noundef null) #4
  br label %101

28:                                               ; preds = %24
  %.not82 = icmp eq i32 %25, 0
  br i1 %.not82, label %select.unfold, label %.thread91

select.unfold:                                    ; preds = %28, %.thread
  %29 = getelementptr inbounds i8, ptr %.090, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !18
  %31 = icmp sgt i32 %30, -1
  br i1 %31, label %32, label %.thread91

32:                                               ; preds = %select.unfold
  %33 = tail call i32 @per_get_few_bits(ptr noundef %4, i32 noundef %30) #4
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 964, i32 noundef 100, ptr noundef null) #4
  br label %101

36:                                               ; preds = %32
  %37 = zext nneg i32 %33 to i64
  %38 = getelementptr inbounds i8, ptr %.090, i64 24
  %39 = load i64, ptr %38, align 8, !tbaa !19
  %40 = icmp slt i64 %39, %37
  br i1 %40, label %41, label %57

41:                                               ; preds = %36
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 969, i32 noundef 102, ptr noundef null) #4
  br label %101

.thread91:                                        ; preds = %28, %19, %select.unfold
  %.not8397 = phi i1 [ false, %select.unfold ], [ true, %19 ], [ true, %28 ]
  %.195 = phi ptr [ %.090, %select.unfold ], [ null, %19 ], [ null, %28 ]
  %42 = getelementptr inbounds i8, ptr %8, i64 40
  %43 = load i32, ptr %42, align 8, !tbaa !20
  %44 = icmp eq i32 %43, -1
  br i1 %44, label %45, label %46

45:                                               ; preds = %.thread91
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 973, i32 noundef 102, ptr noundef null) #4
  br label %101

46:                                               ; preds = %.thread91
  %47 = tail call i64 @uper_get_nsnnwn(ptr noundef %4) #4
  %48 = trunc i64 %47 to i32
  %49 = icmp slt i32 %48, 0
  br i1 %49, label %50, label %51

50:                                               ; preds = %46
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 977, i32 noundef 100, ptr noundef null) #4
  br label %101

51:                                               ; preds = %46
  %52 = load i32, ptr %42, align 8, !tbaa !20
  %53 = add nsw i32 %52, %48
  %54 = getelementptr inbounds i8, ptr %1, i64 144
  %55 = load i32, ptr %54, align 8, !tbaa !21
  %.not84 = icmp slt i32 %53, %55
  br i1 %.not84, label %57, label %56

56:                                               ; preds = %51
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 981, i32 noundef 102, ptr noundef null) #4
  br label %101

57:                                               ; preds = %51, %36
  %.not8396 = phi i1 [ false, %36 ], [ %.not8397, %51 ]
  %.194 = phi ptr [ %.090, %36 ], [ %.195, %51 ]
  %.062 = phi i32 [ %33, %36 ], [ %53, %51 ]
  %58 = getelementptr inbounds i8, ptr %8, i64 32
  %59 = load ptr, ptr %58, align 8, !tbaa !22
  %.not85 = icmp eq ptr %59, null
  br i1 %.not85, label %64, label %60

60:                                               ; preds = %57
  %61 = sext i32 %.062 to i64
  %62 = getelementptr inbounds i32, ptr %59, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !23
  br label %64

64:                                               ; preds = %60, %57
  %.163 = phi i32 [ %63, %60 ], [ %.062, %57 ]
  %65 = getelementptr inbounds i8, ptr %8, i64 8
  %66 = load i32, ptr %65, align 8, !tbaa !24
  %67 = getelementptr inbounds i8, ptr %8, i64 12
  %68 = load i32, ptr %67, align 4, !tbaa !25
  %69 = add nsw i32 %.163, 1
  tail call void @_set_present_idx(ptr noundef nonnull %.064, i32 noundef %66, i32 noundef %68, i32 noundef %69)
  %70 = getelementptr inbounds i8, ptr %1, i64 136
  %71 = load ptr, ptr %70, align 8, !tbaa !26
  %72 = sext i32 %.163 to i64
  %73 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %71, i64 %72
  %74 = load i32, ptr %73, align 8, !tbaa !27
  %75 = and i32 %74, 1
  %.not86 = icmp eq i32 %75, 0
  %76 = getelementptr inbounds i8, ptr %73, i64 8
  %77 = load i32, ptr %76, align 8, !tbaa !29
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %.064, i64 %78
  br i1 %.not86, label %80, label %81

80:                                               ; preds = %64
  store ptr %79, ptr %6, align 8, !tbaa !11
  br label %81

81:                                               ; preds = %64, %80
  %.065 = phi ptr [ %6, %80 ], [ %79, %64 ]
  br i1 %.not8396, label %94, label %82

82:                                               ; preds = %81
  %83 = getelementptr inbounds i8, ptr %.194, i64 4
  %84 = load i32, ptr %83, align 4, !tbaa !18
  %85 = icmp sgt i32 %84, -1
  br i1 %85, label %86, label %94

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %73, i64 24
  %88 = load ptr, ptr %87, align 8, !tbaa !30
  %89 = getelementptr inbounds i8, ptr %88, i64 72
  %90 = load ptr, ptr %89, align 8, !tbaa !31
  %91 = getelementptr inbounds i8, ptr %73, i64 40
  %92 = load ptr, ptr %91, align 8, !tbaa !32
  %93 = call { i32, i64 } %90(ptr noundef %0, ptr noundef %88, ptr noundef %92, ptr noundef nonnull %.065, ptr noundef %4) #4
  br label %100

94:                                               ; preds = %82, %81
  %95 = getelementptr inbounds i8, ptr %73, i64 24
  %96 = load ptr, ptr %95, align 8, !tbaa !30
  %97 = getelementptr inbounds i8, ptr %73, i64 40
  %98 = load ptr, ptr %97, align 8, !tbaa !32
  %99 = call { i32, i64 } @uper_open_type_get(ptr noundef %0, ptr noundef %96, ptr noundef %98, ptr noundef nonnull %.065, ptr noundef %4) #4
  br label %100

100:                                              ; preds = %94, %86
  %.pn = phi { i32, i64 } [ %93, %86 ], [ %99, %94 ]
  %.sroa.8.0 = extractvalue { i32, i64 } %.pn, 1
  %.sroa.036.0 = extractvalue { i32, i64 } %.pn, 0
  br label %101

101:                                              ; preds = %100, %56, %50, %45, %41, %35, %27, %17, %11
  %.sroa.061.0 = phi i32 [ 2, %11 ], [ 1, %27 ], [ 1, %35 ], [ 2, %41 ], [ %.sroa.036.0, %100 ], [ 2, %45 ], [ 1, %50 ], [ 2, %56 ], [ 2, %17 ]
  %.sroa.11.0 = phi i64 [ 0, %11 ], [ 0, %27 ], [ 0, %35 ], [ 0, %41 ], [ %.sroa.8.0, %100 ], [ 0, %45 ], [ 0, %50 ], [ 0, %56 ], [ 0, %17 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %.sroa.061.0, 0
  %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 %.sroa.11.0, 1
  ret { i32, i64 } %.fca.1.insert
}

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

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

declare i64 @uper_get_nsnnwn(ptr noundef) local_unnamed_addr #2

declare { i32, i64 } @uper_open_type_get(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind allocsize(0,1) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"asn_CHOICE_specifics_s", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40}
!14 = !{!6, !7, i64 128}
!15 = !{!16, !10, i64 0}
!16 = !{!"asn_per_constraint_s", !10, i64 0, !10, i64 4, !10, i64 8, !17, i64 16, !17, i64 24}
!17 = !{!"long", !8, i64 0}
!18 = !{!16, !10, i64 4}
!19 = !{!16, !17, i64 24}
!20 = !{!13, !10, i64 40}
!21 = !{!6, !10, i64 144}
!22 = !{!13, !7, i64 32}
!23 = !{!10, !10, i64 0}
!24 = !{!13, !10, i64 8}
!25 = !{!13, !10, i64 12}
!26 = !{!6, !7, i64 136}
!27 = !{!28, !10, i64 0}
!28 = !{!"asn_TYPE_member_s", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!29 = !{!28, !10, i64 8}
!30 = !{!28, !7, i64 24}
!31 = !{!6, !7, i64 72}
!32 = !{!28, !7, i64 40}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass