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

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

@.str.1 = 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 i32 @asn_set_add(ptr noundef, ptr noundef) #3

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

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

36:                                               ; preds = %5
  br label %37

37:                                               ; preds = %36
  %38 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %38, align 8, !tbaa !14
  %39 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %39, align 8, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 1160, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %229

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40
  br label %42

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

45:                                               ; preds = %42
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.asn_SET_OF_specifics_s, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 4, !tbaa !18
  %49 = sext i32 %48 to i64
  %50 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %49) #6
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %50, ptr %51, align 8, !tbaa !5
  store ptr %50, ptr %15, align 8, !tbaa !5
  %52 = load ptr, ptr %15, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %60, label %54

54:                                               ; preds = %45
  br label %55

55:                                               ; preds = %54
  %56 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %56, align 8, !tbaa !14
  %57 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %57, align 8, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 1169, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %229

58:                                               ; No predecessors!
  br label %59

59:                                               ; preds = %58
  br label %60

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

61:                                               ; preds = %60, %42
  %62 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %62, ptr %16, align 8, !tbaa !5
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %68

65:                                               ; preds = %61
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %66, i32 0, i32 1
  store ptr %67, ptr %17, align 8, !tbaa !5
  br label %80

68:                                               ; preds = %61
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %69, i32 0, i32 16
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %78

73:                                               ; preds = %68
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %74, i32 0, i32 16
  %76 = load ptr, ptr %75, align 8, !tbaa !20
  %77 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %76, i32 0, i32 1
  store ptr %77, ptr %17, align 8, !tbaa !5
  br label %79

78:                                               ; preds = %68
  store ptr null, ptr %17, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %78, %73
  br label %80

80:                                               ; preds = %79, %65
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %108

83:                                               ; preds = %80
  %84 = load ptr, ptr %17, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !21
  %87 = and i32 %86, 4
  %88 = icmp ne i32 %87, 0
  br i1 %88, label %89, label %108

89:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = call i32 @per_get_few_bits(ptr noundef %90, i32 noundef 1)
  store i32 %91, ptr %21, align 4, !tbaa !13
  %92 = load i32, ptr %21, align 4, !tbaa !13
  %93 = icmp slt i32 %92, 0
  br i1 %93, label %94, label %100

94:                                               ; preds = %89
  br label %95

95:                                               ; preds = %94
  %96 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %96, align 8, !tbaa !14
  %97 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %97, align 8, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 1186, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %105

98:                                               ; No predecessors!
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99, %89
  %101 = load i32, ptr %21, align 4, !tbaa !13
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %100
  store ptr null, ptr %17, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %103, %100
  store i32 0, ptr %20, align 4
  br label %105

105:                                              ; preds = %104, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  %106 = load i32, ptr %20, align 4
  switch i32 %106, label %229 [
    i32 0, label %107
  ]

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107, %83, %80
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %137

111:                                              ; preds = %108
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %112, i32 0, i32 2
  %114 = load i32, ptr %113, align 8, !tbaa !23
  %115 = icmp sge i32 %114, 0
  br i1 %115, label %116, label %137

116:                                              ; preds = %111
  %117 = load ptr, ptr %11, align 8, !tbaa !5
  %118 = load ptr, ptr %17, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %118, i32 0, i32 2
  %120 = load i32, ptr %119, align 8, !tbaa !23
  %121 = call i32 @per_get_few_bits(ptr noundef %117, i32 noundef %120)
  %122 = sext i32 %121 to i64
  store i64 %122, ptr %19, align 8, !tbaa !24
  %123 = load i64, ptr %19, align 8, !tbaa !24
  %124 = icmp slt i64 %123, 0
  br i1 %124, label %125, label %131

125:                                              ; preds = %116
  br label %126

126:                                              ; preds = %125
  %127 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %127, align 8, !tbaa !14
  %128 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %128, align 8, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 1199, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %229

129:                                              ; No predecessors!
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130, %116
  %132 = load ptr, ptr %17, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %132, i32 0, i32 3
  %134 = load i64, ptr %133, align 8, !tbaa !25
  %135 = load i64, ptr %19, align 8, !tbaa !24
  %136 = add nsw i64 %135, %134
  store i64 %136, ptr %19, align 8, !tbaa !24
  br label %138

137:                                              ; preds = %111, %108
  store i64 -1, ptr %19, align 8, !tbaa !24
  br label %138

138:                                              ; preds = %137, %131
  br label %139

139:                                              ; preds = %223, %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %140 = load i64, ptr %19, align 8, !tbaa !24
  %141 = icmp slt i64 %140, 0
  br i1 %141, label %142, label %163

142:                                              ; preds = %139
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %150

146:                                              ; preds = %142
  %147 = load ptr, ptr %17, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %147, i32 0, i32 2
  %149 = load i32, ptr %148, align 8, !tbaa !23
  br label %151

150:                                              ; preds = %142
  br label %151

151:                                              ; preds = %150, %146
  %152 = phi i32 [ %149, %146 ], [ -1, %150 ]
  %153 = call i64 @uper_get_length(ptr noundef %143, i32 noundef %152, ptr noundef %18)
  store i64 %153, ptr %19, align 8, !tbaa !24
  %154 = load i64, ptr %19, align 8, !tbaa !24
  %155 = icmp slt i64 %154, 0
  br i1 %155, label %156, label %162

156:                                              ; preds = %151
  br label %157

157:                                              ; preds = %156
  %158 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %158, align 8, !tbaa !14
  %159 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %159, align 8, !tbaa !17
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 1214, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %20, align 4
  br label %220

160:                                              ; No predecessors!
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161, %151
  br label %163

163:                                              ; preds = %162, %139
  store i32 0, ptr %22, align 4, !tbaa !13
  br label %164

164:                                              ; preds = %216, %163
  %165 = load i32, ptr %22, align 4, !tbaa !13
  %166 = sext i32 %165 to i64
  %167 = load i64, ptr %19, align 8, !tbaa !24
  %168 = icmp slt i64 %166, %167
  br i1 %168, label %169, label %219

169:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  store ptr null, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  %170 = load ptr, ptr %14, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %170, i32 0, i32 5
  %172 = load ptr, ptr %171, align 8, !tbaa !26
  %173 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %172, i32 0, i32 9
  %174 = load ptr, ptr %173, align 8, !tbaa !28
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %176, i32 0, i32 5
  %178 = load ptr, ptr %177, align 8, !tbaa !26
  %179 = load ptr, ptr %14, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %179, i32 0, i32 7
  %181 = load ptr, ptr %180, align 8, !tbaa !29
  %182 = load ptr, ptr %11, align 8, !tbaa !5
  %183 = call { i32, i64 } %174(ptr noundef %175, ptr noundef %178, ptr noundef %181, ptr noundef %23, ptr noundef %182)
  %184 = getelementptr inbounds { i32, i64 }, ptr %24, i32 0, i32 0
  %185 = extractvalue { i32, i64 } %183, 0
  store i32 %185, ptr %184, align 8
  %186 = getelementptr inbounds { i32, i64 }, ptr %24, i32 0, i32 1
  %187 = extractvalue { i32, i64 } %183, 1
  store i64 %187, ptr %186, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !30
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  %188 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %12, i32 0, i32 0
  %189 = load i32, ptr %188, align 8, !tbaa !14
  %190 = icmp eq i32 %189, 0
  br i1 %190, label %191, label %199

191:                                              ; preds = %169
  %192 = load ptr, ptr %16, align 8, !tbaa !5
  %193 = load ptr, ptr %23, align 8, !tbaa !5
  %194 = call i32 @asn_set_add(ptr noundef %192, ptr noundef %193)
  %195 = icmp eq i32 %194, 0
  br i1 %195, label %196, label %197

196:                                              ; preds = %191
  store i32 16, ptr %20, align 4
  br label %214

197:                                              ; preds = %191
  %198 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %12, i32 0, i32 0
  store i32 2, ptr %198, align 8, !tbaa !14
  br label %200

199:                                              ; preds = %169
  br label %200

200:                                              ; preds = %199, %197
  %201 = load ptr, ptr %23, align 8, !tbaa !5
  %202 = icmp ne ptr %201, null
  br i1 %202, label %203, label %213

203:                                              ; preds = %200
  %204 = load ptr, ptr %14, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %204, i32 0, i32 5
  %206 = load ptr, ptr %205, align 8, !tbaa !26
  %207 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %206, i32 0, i32 2
  %208 = load ptr, ptr %207, align 8, !tbaa !31
  %209 = load ptr, ptr %14, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.asn_TYPE_member_s, ptr %209, i32 0, i32 5
  %211 = load ptr, ptr %210, align 8, !tbaa !26
  %212 = load ptr, ptr %23, align 8, !tbaa !5
  call void %208(ptr noundef %211, ptr noundef %212, i32 noundef 0)
  br label %213

213:                                              ; preds = %203, %200
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !30
  store i32 1, ptr %20, align 4
  br label %214

214:                                              ; preds = %213, %196
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  %215 = load i32, ptr %20, align 4
  switch i32 %215, label %220 [
    i32 16, label %216
  ]

216:                                              ; preds = %214
  %217 = load i32, ptr %22, align 4, !tbaa !13
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %22, align 4, !tbaa !13
  br label %164, !llvm.loop !32

219:                                              ; preds = %164
  store i64 -1, ptr %19, align 8, !tbaa !24
  store i32 0, ptr %20, align 4
  br label %220

220:                                              ; preds = %219, %214, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  %221 = load i32, ptr %20, align 4
  switch i32 %221, label %229 [
    i32 0, label %222
  ]

222:                                              ; preds = %220
  br label %223

223:                                              ; preds = %222
  %224 = load i32, ptr %18, align 4, !tbaa !13
  %225 = icmp ne i32 %224, 0
  br i1 %225, label %139, label %226, !llvm.loop !34

226:                                              ; preds = %223
  %227 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %12, i32 0, i32 0
  store i32 0, ptr %227, align 8, !tbaa !14
  %228 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %12, i32 0, i32 1
  store i64 0, ptr %228, align 8, !tbaa !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !30
  store i32 1, ptr %20, align 4
  br label %229

229:                                              ; preds = %226, %220, %126, %105, %55, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, 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 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  %230 = load { i32, i64 }, ptr %6, align 8
  ret { i32, i64 } %230
}

; 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_length(ptr noundef, i32 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 = !{!10, !6, i64 136}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"asn_dec_rval_s", !11, i64 0, !16, i64 8}
!16 = !{!"long", !7, i64 0}
!17 = !{!15, !16, i64 8}
!18 = !{!19, !11, i64 0}
!19 = !{!"asn_SET_OF_specifics_s", !11, i64 0, !11, i64 4, !11, i64 8}
!20 = !{!10, !6, i64 128}
!21 = !{!22, !11, i64 0}
!22 = !{!"asn_per_constraint_s", !11, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !16, i64 24}
!23 = !{!22, !11, i64 8}
!24 = !{!16, !16, i64 0}
!25 = !{!22, !16, i64 16}
!26 = !{!27, !6, i64 24}
!27 = !{!"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}
!28 = !{!10, !6, i64 72}
!29 = !{!27, !6, i64 40}
!30 = !{i64 0, i64 4, !13, i64 8, i64 8, !24}
!31 = !{!10, !6, i64 16}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = 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 i32 @asn_set_add(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local { i32, i64 } @SET_OF_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 i32, align 4
  %7 = alloca ptr, align 8
  %8 = getelementptr inbounds i8, ptr %1, i64 152
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %1, i64 136
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = load ptr, ptr %3, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  store i32 0, ptr %6, align 4, !tbaa !13
  %13 = tail call i32 @ASN__STACK_OVERFLOW_CHECK(ptr noundef %0)
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %15, label %14

14:                                               ; preds = %5
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 1160, i32 noundef 102, ptr noundef null) #4
  br label %.thread106

15:                                               ; preds = %5
  %.not74 = icmp eq ptr %12, null
  br i1 %.not74, label %16, label %21

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

20:                                               ; preds = %16
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 1169, i32 noundef 102, ptr noundef null) #4
  br label %.thread106

21:                                               ; preds = %16, %15
  %.062 = phi ptr [ %12, %15 ], [ %19, %16 ]
  %.not76 = icmp eq ptr %2, null
  br i1 %.not76, label %22, label %25

22:                                               ; preds = %21
  %23 = getelementptr inbounds i8, ptr %1, i64 128
  %24 = load ptr, ptr %23, align 8, !tbaa !16
  %.not77 = icmp eq ptr %24, null
  br i1 %.not77, label %.thread90.split.us.preheader, label %25

25:                                               ; preds = %21, %22
  %.pn = phi ptr [ %24, %22 ], [ %2, %21 ]
  %.058.ph = getelementptr inbounds i8, ptr %.pn, i64 32
  %26 = load i32, ptr %.058.ph, align 8, !tbaa !17
  %27 = and i32 %26, 4
  %.not79 = icmp eq i32 %27, 0
  br i1 %.not79, label %.thread95, label %28

28:                                               ; preds = %25
  %29 = tail call i32 @per_get_few_bits(ptr noundef %4, i32 noundef 1) #4
  %30 = icmp sgt i32 %29, -1
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 1186, i32 noundef 100, ptr noundef null) #4
  br label %.thread106

32:                                               ; preds = %28
  %.not80.not = icmp eq i32 %29, 0
  br i1 %.not80.not, label %.thread95, label %.thread90.split.us.preheader

.thread95:                                        ; preds = %25, %32
  %33 = getelementptr inbounds i8, ptr %.pn, i64 40
  %34 = load i32, ptr %33, align 8, !tbaa !20
  %35 = icmp sgt i32 %34, -1
  br i1 %35, label %36, label %.thread90.split.preheader

36:                                               ; preds = %.thread95
  %37 = tail call i32 @per_get_few_bits(ptr noundef %4, i32 noundef %34) #4
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 1199, i32 noundef 100, ptr noundef null) #4
  br label %.thread106

40:                                               ; preds = %36
  %41 = zext nneg i32 %37 to i64
  %42 = getelementptr inbounds i8, ptr %.pn, i64 48
  %43 = load i64, ptr %42, align 8, !tbaa !21
  %44 = add nsw i64 %43, %41
  br label %.thread90.split.preheader

.thread90.split.preheader:                        ; preds = %40, %.thread95
  %.055 = phi i64 [ %44, %40 ], [ -1, %.thread95 ]
  %45 = getelementptr inbounds i8, ptr %.pn, i64 40
  %46 = getelementptr inbounds i8, ptr %11, i64 24
  %47 = getelementptr inbounds i8, ptr %11, i64 40
  br label %.thread90.split

.thread90.split.us.preheader:                     ; preds = %32, %22
  %48 = getelementptr inbounds i8, ptr %11, i64 24
  %49 = getelementptr inbounds i8, ptr %11, i64 40
  br label %50

50:                                               ; preds = %._crit_edge.us, %.thread90.split.us.preheader
  %51 = call i64 @uper_get_length(ptr noundef %4, i32 noundef -1, ptr noundef nonnull %6) #4
  %52 = icmp slt i64 %51, 0
  br i1 %52, label %.split.us, label %53

53:                                               ; preds = %50
  %.not118 = icmp eq i64 %51, 0
  br i1 %.not118, label %._crit_edge.us, label %.lr.ph.us

._crit_edge.us:                                   ; preds = %66, %53
  %54 = load i32, ptr %6, align 4, !tbaa !13
  %.not83.us = icmp eq i32 %54, 0
  br i1 %.not83.us, label %.thread106, label %50, !llvm.loop !22

.lr.ph.us:                                        ; preds = %53, %66
  %indvars.iv127 = phi i64 [ %indvars.iv.next128, %66 ], [ 0, %53 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store ptr null, ptr %7, align 8, !tbaa !12
  %55 = load ptr, ptr %48, align 8, !tbaa !24
  %56 = getelementptr inbounds i8, ptr %55, i64 72
  %57 = load ptr, ptr %56, align 8, !tbaa !26
  %58 = load ptr, ptr %49, align 8, !tbaa !27
  %59 = call { i32, i64 } %57(ptr noundef %0, ptr noundef %55, ptr noundef %58, ptr noundef nonnull %7, ptr noundef %4) #4
  %60 = extractvalue { i32, i64 } %59, 0
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %.split115.us

62:                                               ; preds = %.lr.ph.us
  %63 = load ptr, ptr %7, align 8, !tbaa !12
  %64 = call i32 @asn_set_add(ptr noundef nonnull %.062, ptr noundef %63) #4
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %.split115.us

66:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %exitcond130.not = icmp eq i64 %indvars.iv.next128, %51
  br i1 %exitcond130.not, label %._crit_edge.us, label %.lr.ph.us, !llvm.loop !28

.thread90.split:                                  ; preds = %.thread90.split.preheader, %._crit_edge
  %.156 = phi i64 [ -1, %._crit_edge ], [ %.055, %.thread90.split.preheader ]
  %67 = icmp slt i64 %.156, 0
  br i1 %67, label %68, label %72

68:                                               ; preds = %.thread90.split
  %69 = load i32, ptr %45, align 8, !tbaa !20
  %70 = call i64 @uper_get_length(ptr noundef %4, i32 noundef %69, ptr noundef nonnull %6) #4
  %71 = icmp slt i64 %70, 0
  br i1 %71, label %.split.us, label %72

.split.us:                                        ; preds = %68, %50
  call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 1214, i32 noundef 100, ptr noundef null) #4
  br label %.thread106

72:                                               ; preds = %68, %.thread90.split
  %.257 = phi i64 [ %70, %68 ], [ %.156, %.thread90.split ]
  %.not117 = icmp eq i64 %.257, 0
  br i1 %.not117, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %72, %91
  %indvars.iv = phi i64 [ %indvars.iv.next, %91 ], [ 0, %72 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store ptr null, ptr %7, align 8, !tbaa !12
  %73 = load ptr, ptr %46, align 8, !tbaa !24
  %74 = getelementptr inbounds i8, ptr %73, i64 72
  %75 = load ptr, ptr %74, align 8, !tbaa !26
  %76 = load ptr, ptr %47, align 8, !tbaa !27
  %77 = call { i32, i64 } %75(ptr noundef %0, ptr noundef %73, ptr noundef %76, ptr noundef nonnull %7, ptr noundef %4) #4
  %78 = extractvalue { i32, i64 } %77, 0
  %79 = icmp eq i32 %78, 0
  br i1 %79, label %80, label %.split115.us

80:                                               ; preds = %.lr.ph
  %81 = load ptr, ptr %7, align 8, !tbaa !12
  %82 = call i32 @asn_set_add(ptr noundef nonnull %.062, ptr noundef %81) #4
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %91, label %.split115.us

.split115.us:                                     ; preds = %.lr.ph, %80, %.lr.ph.us, %62
  %84 = phi ptr [ %48, %62 ], [ %48, %.lr.ph.us ], [ %46, %80 ], [ %46, %.lr.ph ]
  %.us-phi = phi { i32, i64 } [ %59, %62 ], [ %59, %.lr.ph.us ], [ %77, %80 ], [ %77, %.lr.ph ]
  %.us-phi116 = phi i32 [ %60, %.lr.ph.us ], [ 2, %62 ], [ %78, %.lr.ph ], [ 2, %80 ]
  %85 = extractvalue { i32, i64 } %.us-phi, 1
  %86 = load ptr, ptr %7, align 8, !tbaa !12
  %.not82 = icmp eq ptr %86, null
  br i1 %.not82, label %.thread101, label %87

87:                                               ; preds = %.split115.us
  %88 = load ptr, ptr %84, align 8, !tbaa !24
  %89 = getelementptr inbounds i8, ptr %88, i64 16
  %90 = load ptr, ptr %89, align 8, !tbaa !29
  call void %90(ptr noundef %88, ptr noundef nonnull %86, i32 noundef 0) #4
  br label %.thread101

.thread101:                                       ; preds = %87, %.split115.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %.thread106

91:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %.257
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !28

._crit_edge:                                      ; preds = %91, %72
  %92 = load i32, ptr %6, align 4, !tbaa !13
  %.not83 = icmp eq i32 %92, 0
  br i1 %.not83, label %.thread106, label %.thread90.split, !llvm.loop !22

.thread106:                                       ; preds = %._crit_edge, %._crit_edge.us, %.thread101, %.split.us, %31, %39, %20, %14
  %.sroa.052.6 = phi i32 [ 2, %14 ], [ 1, %39 ], [ 1, %31 ], [ 2, %20 ], [ %.us-phi116, %.thread101 ], [ 1, %.split.us ], [ 0, %._crit_edge.us ], [ 0, %._crit_edge ]
  %.sroa.10.6 = phi i64 [ 0, %14 ], [ 0, %39 ], [ 0, %31 ], [ 0, %20 ], [ %85, %.thread101 ], [ 0, %.split.us ], [ 0, %._crit_edge.us ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %.sroa.052.6, 0
  %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 %.sroa.10.6, 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_length(ptr noundef, i32 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 = !{!6, !7, i64 136}
!12 = !{!7, !7, i64 0}
!13 = !{!10, !10, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"asn_SET_OF_specifics_s", !10, i64 0, !10, i64 4, !10, i64 8}
!16 = !{!6, !7, i64 128}
!17 = !{!18, !10, i64 0}
!18 = !{!"asn_per_constraint_s", !10, i64 0, !10, i64 4, !10, i64 8, !19, i64 16, !19, i64 24}
!19 = !{!"long", !8, i64 0}
!20 = !{!18, !10, i64 8}
!21 = !{!18, !19, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !7, i64 24}
!25 = !{!"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}
!26 = !{!6, !7, i64 72}
!27 = !{!25, !7, i64 40}
!28 = distinct !{!28, !23}
!29 = !{!6, !7, i64 16}


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