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

; 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_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 }
%struct.asn_INTEGER_enum_map_s = type { i64, i64, ptr }

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

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

27:                                               ; preds = %5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %28, i32 0, i32 0
  store ptr %29, ptr %15, align 8, !tbaa !5
  br label %47

30:                                               ; preds = %5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %31, i32 0, i32 16
  %33 = load ptr, ptr %32, align 8, !tbaa !12
  %34 = icmp ne ptr %33, null
  br i1 %34, label %35, label %40

35:                                               ; preds = %30
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.asn_TYPE_descriptor_s, ptr %36, i32 0, i32 16
  %38 = load ptr, ptr %37, align 8, !tbaa !12
  %39 = getelementptr inbounds %struct.asn_per_constraints_s, ptr %38, i32 0, i32 0
  store ptr %39, ptr %15, align 8, !tbaa !5
  br label %46

40:                                               ; preds = %30
  br label %41

41:                                               ; preds = %40
  %42 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %42, align 8, !tbaa !13
  %43 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %43, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 128, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

44:                                               ; No predecessors!
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45, %35
  br label %47

47:                                               ; preds = %46, %27
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %56, label %50

50:                                               ; preds = %47
  br label %51

51:                                               ; preds = %50
  %52 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %52, align 8, !tbaa !13
  %53 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %53, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 131, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54
  br label %56

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

59:                                               ; preds = %56
  %60 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 8) #7
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %60, ptr %61, align 8, !tbaa !5
  store ptr %60, ptr %14, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %70, label %64

64:                                               ; preds = %59
  br label %65

65:                                               ; preds = %64
  %66 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %66, align 8, !tbaa !13
  %67 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %67, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 137, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69, %59
  br label %71

71:                                               ; preds = %70, %56
  %72 = load ptr, ptr %15, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 8, !tbaa !17
  %75 = and i32 %74, 4
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %96

77:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = call i32 @per_get_few_bits(ptr noundef %78, i32 noundef 1)
  store i32 %79, ptr %18, align 4, !tbaa !19
  %80 = load i32, ptr %18, align 4, !tbaa !19
  %81 = icmp slt i32 %80, 0
  br i1 %81, label %82, label %88

82:                                               ; preds = %77
  br label %83

83:                                               ; preds = %82
  %84 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %84, align 8, !tbaa !13
  %85 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %85, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 146, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %93

86:                                               ; No predecessors!
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87, %77
  %89 = load i32, ptr %18, align 4, !tbaa !19
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %92

91:                                               ; preds = %88
  store ptr null, ptr %15, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %91, %88
  store i32 0, ptr %17, align 4
  br label %93

93:                                               ; preds = %92, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %94 = load i32, ptr %17, align 4
  switch i32 %94, label %197 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %96

96:                                               ; preds = %95, %71
  %97 = load ptr, ptr %15, align 8, !tbaa !5
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %145

99:                                               ; preds = %96
  %100 = load ptr, ptr %15, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !20
  %103 = icmp sge i32 %102, 0
  br i1 %103, label %104, label %145

104:                                              ; preds = %99
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.asn_per_constraint_s, ptr %106, i32 0, i32 1
  %108 = load i32, ptr %107, align 4, !tbaa !20
  %109 = call i32 @per_get_few_bits(ptr noundef %105, i32 noundef %108)
  %110 = sext i32 %109 to i64
  store i64 %110, ptr %16, align 8, !tbaa !21
  %111 = load i64, ptr %16, align 8, !tbaa !21
  %112 = icmp slt i64 %111, 0
  br i1 %112, label %113, label %119

113:                                              ; preds = %104
  br label %114

114:                                              ; preds = %113
  %115 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %115, align 8, !tbaa !13
  %116 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %116, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 156, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

117:                                              ; No predecessors!
  br label %118

118:                                              ; preds = %117
  br label %119

119:                                              ; preds = %118, %104
  %120 = load i64, ptr %16, align 8, !tbaa !21
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %121, i32 0, i32 3
  %123 = load i32, ptr %122, align 4, !tbaa !22
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %130

125:                                              ; preds = %119
  %126 = load ptr, ptr %12, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %126, i32 0, i32 3
  %128 = load i32, ptr %127, align 4, !tbaa !22
  %129 = sub nsw i32 %128, 1
  br label %134

130:                                              ; preds = %119
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %131, i32 0, i32 2
  %133 = load i32, ptr %132, align 8, !tbaa !24
  br label %134

134:                                              ; preds = %130, %125
  %135 = phi i32 [ %129, %125 ], [ %133, %130 ]
  %136 = sext i32 %135 to i64
  %137 = icmp sge i64 %120, %136
  br i1 %137, label %138, label %144

138:                                              ; preds = %134
  br label %139

139:                                              ; preds = %138
  %140 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %140, align 8, !tbaa !13
  %141 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %141, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 160, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

142:                                              ; No predecessors!
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143, %134
  br label %188

145:                                              ; preds = %99, %96
  %146 = load ptr, ptr %12, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %146, i32 0, i32 3
  %148 = load i32, ptr %147, align 4, !tbaa !22
  %149 = icmp ne i32 %148, 0
  br i1 %149, label %156, label %150

150:                                              ; preds = %145
  br label %151

151:                                              ; preds = %150
  %152 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %152, align 8, !tbaa !13
  %153 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %153, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 164, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

154:                                              ; No predecessors!
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155, %145
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = call i64 @uper_get_nsnnwn(ptr noundef %157)
  store i64 %158, ptr %16, align 8, !tbaa !21
  %159 = load i64, ptr %16, align 8, !tbaa !21
  %160 = icmp slt i64 %159, 0
  br i1 %160, label %161, label %167

161:                                              ; preds = %156
  br label %162

162:                                              ; preds = %161
  %163 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 1, ptr %163, align 8, !tbaa !13
  %164 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %164, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 171, i32 noundef 100, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

165:                                              ; No predecessors!
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166, %156
  %168 = load ptr, ptr %12, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %168, i32 0, i32 3
  %170 = load i32, ptr %169, align 4, !tbaa !22
  %171 = sub nsw i32 %170, 1
  %172 = sext i32 %171 to i64
  %173 = load i64, ptr %16, align 8, !tbaa !21
  %174 = add nsw i64 %173, %172
  store i64 %174, ptr %16, align 8, !tbaa !21
  %175 = load i64, ptr %16, align 8, !tbaa !21
  %176 = load ptr, ptr %12, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %176, i32 0, i32 2
  %178 = load i32, ptr %177, align 8, !tbaa !24
  %179 = sext i32 %178 to i64
  %180 = icmp sge i64 %175, %179
  br i1 %180, label %181, label %187

181:                                              ; preds = %167
  br label %182

182:                                              ; preds = %181
  %183 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 0
  store i32 2, ptr %183, align 8, !tbaa !13
  %184 = getelementptr inbounds %struct.asn_dec_rval_s, ptr %6, i32 0, i32 1
  store i64 0, ptr %184, align 8, !tbaa !16
  call void @stacktrace_create(ptr noundef @.str.1, i64 noundef 175, i32 noundef 102, ptr noundef null)
  store i32 1, ptr %17, align 4
  br label %197

185:                                              ; No predecessors!
  br label %186

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186, %167
  br label %188

188:                                              ; preds = %187, %144
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.asn_INTEGER_specifics_s, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !25
  %192 = load i64, ptr %16, align 8, !tbaa !21
  %193 = getelementptr inbounds %struct.asn_INTEGER_enum_map_s, ptr %191, i64 %192
  %194 = getelementptr inbounds %struct.asn_INTEGER_enum_map_s, ptr %193, i32 0, i32 0
  %195 = load i64, ptr %194, align 8, !tbaa !26
  %196 = load ptr, ptr %14, align 8, !tbaa !5
  store i64 %195, ptr %196, align 8, !tbaa !21
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !28
  store i32 1, ptr %17, align 4
  br label %197

197:                                              ; preds = %188, %182, %162, %151, %139, %114, %93, %65, %51, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %198 = load { i32, i64 }, ptr %6, align 8
  ret { i32, i64 } %198
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #5

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

declare i64 @uper_get_nsnnwn(ptr 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { 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 128}
!13 = !{!14, !11, i64 0}
!14 = !{!"asn_dec_rval_s", !11, i64 0, !15, i64 8}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = !{!18, !11, i64 0}
!18 = !{!"asn_per_constraint_s", !11, i64 0, !11, i64 4, !11, i64 8, !15, i64 16, !15, i64 24}
!19 = !{!11, !11, i64 0}
!20 = !{!18, !11, i64 4}
!21 = !{!15, !15, i64 0}
!22 = !{!23, !11, i64 20}
!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 = !{!23, !11, i64 16}
!25 = !{!23, !6, i64 0}
!26 = !{!27, !15, i64 0}
!27 = !{!"asn_INTEGER_enum_map_s", !15, i64 0, !15, i64 8, !6, i64 16}
!28 = !{i64 0, i64 4, !19, i64 8, i64 8, !21}


; 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_INTEGER_enum_map_s = type { i64, i64, ptr }

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

; Function Attrs: nounwind uwtable
define dso_local { i32, i64 } @NativeEnumerated_decode_uper(ptr nocapture noundef readnone %0, ptr nocapture noundef readonly %1, ptr noundef readonly %2, ptr nocapture noundef %3, ptr noundef %4) local_unnamed_addr #0 {
  %6 = getelementptr inbounds i8, ptr %1, i64 152
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8, !tbaa !11
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %9, label %13

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %1, i64 128
  %11 = load ptr, ptr %10, align 8, !tbaa !12
  %.not50 = icmp eq ptr %11, null
  br i1 %.not50, label %12, label %13

12:                                               ; preds = %9
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 128, i32 noundef 102, ptr noundef null) #3
  br label %67

13:                                               ; preds = %9, %5
  %.037 = phi ptr [ %2, %5 ], [ %11, %9 ]
  %.not51 = icmp eq ptr %7, null
  br i1 %.not51, label %14, label %15

14:                                               ; preds = %13
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 131, i32 noundef 102, ptr noundef null) #3
  br label %67

15:                                               ; preds = %13
  %.not52 = icmp eq ptr %8, null
  br i1 %.not52, label %16, label %19

16:                                               ; preds = %15
  %17 = tail call noalias dereferenceable_or_null(8) ptr @calloc(i64 noundef 1, i64 noundef 8) #4
  store ptr %17, ptr %3, align 8, !tbaa !11
  %.not53 = icmp eq ptr %17, null
  br i1 %.not53, label %18, label %19

18:                                               ; preds = %16
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 137, i32 noundef 102, ptr noundef null) #3
  br label %67

19:                                               ; preds = %16, %15
  %.038 = phi ptr [ %8, %15 ], [ %17, %16 ]
  %20 = load i32, ptr %.037, align 8, !tbaa !13
  %21 = and i32 %20, 4
  %.not54 = icmp eq i32 %21, 0
  br i1 %.not54, label %.thread62, label %22

22:                                               ; preds = %19
  %23 = tail call i32 @per_get_few_bits(ptr noundef %4, i32 noundef 1) #3
  %24 = icmp sgt i32 %23, -1
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 146, i32 noundef 100, ptr noundef null) #3
  br label %67

26:                                               ; preds = %22
  %.not55.not = icmp eq i32 %23, 0
  br i1 %.not55.not, label %.thread62, label %46

.thread62:                                        ; preds = %19, %26
  %27 = getelementptr inbounds i8, ptr %.037, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !16
  %29 = icmp sgt i32 %28, -1
  br i1 %29, label %30, label %46

30:                                               ; preds = %.thread62
  %31 = tail call i32 @per_get_few_bits(ptr noundef %4, i32 noundef %28) #3
  %32 = sext i32 %31 to i64
  %33 = icmp slt i32 %31, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %30
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 156, i32 noundef 100, ptr noundef null) #3
  br label %67

35:                                               ; preds = %30
  %36 = getelementptr inbounds i8, ptr %7, i64 20
  %37 = load i32, ptr %36, align 4, !tbaa !17
  %.not59 = icmp eq i32 %37, 0
  br i1 %.not59, label %40, label %38

38:                                               ; preds = %35
  %39 = add nsw i32 %37, -1
  br label %43

40:                                               ; preds = %35
  %41 = getelementptr inbounds i8, ptr %7, i64 16
  %42 = load i32, ptr %41, align 8, !tbaa !19
  br label %43

43:                                               ; preds = %40, %38
  %44 = phi i32 [ %39, %38 ], [ %42, %40 ]
  %.not60 = icmp slt i32 %31, %44
  br i1 %.not60, label %63, label %45

45:                                               ; preds = %43
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 160, i32 noundef 102, ptr noundef null) #3
  br label %67

46:                                               ; preds = %.thread62, %26
  %47 = getelementptr inbounds i8, ptr %7, i64 20
  %48 = load i32, ptr %47, align 4, !tbaa !17
  %.not57 = icmp eq i32 %48, 0
  br i1 %.not57, label %49, label %50

49:                                               ; preds = %46
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 164, i32 noundef 102, ptr noundef null) #3
  br label %67

50:                                               ; preds = %46
  %51 = tail call i64 @uper_get_nsnnwn(ptr noundef %4) #3
  %52 = icmp slt i64 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %50
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 171, i32 noundef 100, ptr noundef null) #3
  br label %67

54:                                               ; preds = %50
  %55 = load i32, ptr %47, align 4, !tbaa !17
  %56 = add nsw i32 %55, -1
  %57 = sext i32 %56 to i64
  %58 = add nsw i64 %51, %57
  %59 = getelementptr inbounds i8, ptr %7, i64 16
  %60 = load i32, ptr %59, align 8, !tbaa !19
  %61 = sext i32 %60 to i64
  %.not58 = icmp slt i64 %58, %61
  br i1 %.not58, label %63, label %62

62:                                               ; preds = %54
  tail call void @stacktrace_create(ptr noundef nonnull @.str.1, i64 noundef 175, i32 noundef 102, ptr noundef null) #3
  br label %67

63:                                               ; preds = %54, %43
  %.036 = phi i64 [ %32, %43 ], [ %58, %54 ]
  %64 = load ptr, ptr %7, align 8, !tbaa !20
  %65 = getelementptr inbounds %struct.asn_INTEGER_enum_map_s, ptr %64, i64 %.036
  %66 = load i64, ptr %65, align 8, !tbaa !21
  store i64 %66, ptr %.038, align 8, !tbaa !23
  br label %67

67:                                               ; preds = %25, %63, %62, %53, %49, %45, %34, %18, %14, %12
  %.sroa.0.1 = phi i32 [ 1, %34 ], [ 2, %45 ], [ 0, %63 ], [ 1, %53 ], [ 2, %62 ], [ 2, %49 ], [ 1, %25 ], [ 2, %18 ], [ 2, %14 ], [ 2, %12 ]
  %.fca.0.insert = insertvalue { i32, i64 } poison, i32 %.sroa.0.1, 0
  %.fca.1.insert = insertvalue { i32, i64 } %.fca.0.insert, i64 0, 1
  ret { i32, i64 } %.fca.1.insert
}

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

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

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

declare i64 @uper_get_nsnnwn(ptr noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { nounwind }
attributes #4 = { 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 = !{!6, !7, i64 128}
!13 = !{!14, !10, i64 0}
!14 = !{!"asn_per_constraint_s", !10, i64 0, !10, i64 4, !10, i64 8, !15, i64 16, !15, i64 24}
!15 = !{!"long", !8, i64 0}
!16 = !{!14, !10, i64 4}
!17 = !{!18, !10, i64 20}
!18 = !{!"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}
!19 = !{!18, !10, i64 16}
!20 = !{!18, !7, i64 0}
!21 = !{!22, !15, i64 0}
!22 = !{!"asn_INTEGER_enum_map_s", !15, i64 0, !15, i64 8, !7, i64 16}
!23 = !{!15, !15, i64 0}


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