; LLVM IR from lfarcaro/ARINC653_ARMV7A_Z7000 :: ARINC653_ARMV7A_Z7000.sw/ARINC653_ARMV7A_Z7000/src/ARINC653 (ERROR)

; 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._MODULE_INFORMATION_TYPE = type { ptr, %struct._heapRECORD, i32, i32, i32, %struct._CONTEXT_TYPE, i32, ptr, ptr, %struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE, i64, i64, i64, %struct._priorityqueueRECORD }
%struct._heapRECORD = type { ptr, i32, i32, i32 }
%struct._CONTEXT_TYPE = type { i32, ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i32, i32, i32 }
%struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE = type { i8, ptr, i32, %struct._CONTEXT_TYPE, i8, i8, i8, i8, i32, i32 }
%struct._priorityqueueRECORD = type { ptr, i32, i8, i8 }
%struct._MODULE_CONFIGURATION_TYPE = type { i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, i64, ptr, ptr, i32, ptr, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE = type { ptr, i32, i32, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE = type { i32, i32, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE = type { i32, i32, i32, i32 }

@CORE_MODULE_INFORMATION = external global [2 x %struct._MODULE_INFORMATION_TYPE], align 16

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

declare void @ENTER_CORE() #1

declare void @EXIT_CORE() #1

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

declare i32 @PORT_GETCORE() #1

; Function Attrs: nounwind uwtable
define dso_local void @RAISE_ERROR(i8 noundef zeroext %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10) #2 {
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  store i8 %0, ptr %12, align 1, !tbaa !5
  store i8 %1, ptr %13, align 1, !tbaa !5
  store i8 %2, ptr %14, align 1, !tbaa !5
  store i32 %3, ptr %15, align 4, !tbaa !8
  store i32 %4, ptr %16, align 4, !tbaa !8
  store i32 %5, ptr %17, align 4, !tbaa !8
  store ptr %6, ptr %18, align 8, !tbaa !10
  store i32 %7, ptr %19, align 4, !tbaa !8
  store i32 %8, ptr %20, align 4, !tbaa !8
  store ptr %9, ptr %21, align 8, !tbaa !10
  store ptr %10, ptr %22, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  %29 = load i8, ptr %12, align 1, !tbaa !5
  %30 = icmp ne i8 %29, 0
  br i1 %30, label %31, label %32

31:                                               ; preds = %11
  call void @ENTER_CORE()
  br label %32

32:                                               ; preds = %31, %11
  %33 = call i32 @PORT_GETCORE()
  %34 = zext i32 %33 to i64
  %35 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %34
  store ptr %35, ptr %23, align 8, !tbaa !10
  store i32 0, ptr %24, align 4, !tbaa !8
  %36 = load ptr, ptr %23, align 8, !tbaa !10
  %37 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !12
  %39 = getelementptr inbounds %struct._MODULE_CONFIGURATION_TYPE, ptr %38, i32 0, i32 13
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  store ptr %40, ptr %25, align 8, !tbaa !10
  %41 = load ptr, ptr %25, align 8, !tbaa !10
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %142

43:                                               ; preds = %32
  store i32 0, ptr %26, align 4, !tbaa !8
  br label %44

44:                                               ; preds = %138, %43
  %45 = load i32, ptr %26, align 4, !tbaa !8
  %46 = load ptr, ptr %25, align 8, !tbaa !10
  %47 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %46, i32 0, i32 2
  %48 = load i32, ptr %47, align 4, !tbaa !21
  %49 = icmp ult i32 %45, %48
  br i1 %49, label %50, label %141

50:                                               ; preds = %44
  %51 = load ptr, ptr %25, align 8, !tbaa !10
  %52 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %51, i32 0, i32 3
  %53 = load ptr, ptr %52, align 8, !tbaa !23
  %54 = load i32, ptr %26, align 4, !tbaa !8
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %53, i64 %55
  %57 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !24
  %59 = load i32, ptr %15, align 4, !tbaa !8
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %61, label %137

61:                                               ; preds = %50
  store i32 0, ptr %27, align 4, !tbaa !8
  br label %62

62:                                               ; preds = %133, %61
  %63 = load i32, ptr %27, align 4, !tbaa !8
  %64 = load ptr, ptr %25, align 8, !tbaa !10
  %65 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %64, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !23
  %67 = load i32, ptr %26, align 4, !tbaa !8
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %66, i64 %68
  %70 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !26
  %72 = icmp ult i32 %63, %71
  br i1 %72, label %73, label %136

73:                                               ; preds = %62
  %74 = load ptr, ptr %25, align 8, !tbaa !10
  %75 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !23
  %77 = load i32, ptr %26, align 4, !tbaa !8
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %76, i64 %78
  %80 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %79, i32 0, i32 2
  %81 = load ptr, ptr %80, align 8, !tbaa !27
  %82 = load i32, ptr %27, align 4, !tbaa !8
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %81, i64 %83
  %85 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 4, !tbaa !28
  %87 = load i32, ptr %16, align 4, !tbaa !8
  %88 = icmp eq i32 %86, %87
  br i1 %88, label %89, label %132

89:                                               ; preds = %73
  %90 = load ptr, ptr %25, align 8, !tbaa !10
  %91 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %90, i32 0, i32 3
  %92 = load ptr, ptr %91, align 8, !tbaa !23
  %93 = load i32, ptr %26, align 4, !tbaa !8
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %92, i64 %94
  %96 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %95, i32 0, i32 2
  %97 = load ptr, ptr %96, align 8, !tbaa !27
  %98 = load i32, ptr %27, align 4, !tbaa !8
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %97, i64 %99
  %101 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %100, i32 0, i32 1
  %102 = load i32, ptr %101, align 4, !tbaa !30
  store i32 %102, ptr %24, align 4, !tbaa !8
  %103 = load ptr, ptr %25, align 8, !tbaa !10
  %104 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %103, i32 0, i32 3
  %105 = load ptr, ptr %104, align 8, !tbaa !23
  %106 = load i32, ptr %26, align 4, !tbaa !8
  %107 = zext i32 %106 to i64
  %108 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %105, i64 %107
  %109 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !27
  %111 = load i32, ptr %27, align 4, !tbaa !8
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %110, i64 %112
  %114 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %113, i32 0, i32 2
  %115 = load i32, ptr %114, align 4, !tbaa !31
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %131

117:                                              ; preds = %89
  %118 = load ptr, ptr %25, align 8, !tbaa !10
  %119 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %118, i32 0, i32 3
  %120 = load ptr, ptr %119, align 8, !tbaa !23
  %121 = load i32, ptr %26, align 4, !tbaa !8
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %120, i64 %122
  %124 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !27
  %126 = load i32, ptr %27, align 4, !tbaa !8
  %127 = zext i32 %126 to i64
  %128 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %125, i64 %127
  %129 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %128, i32 0, i32 2
  %130 = load i32, ptr %129, align 4, !tbaa !31
  store i32 %130, ptr %17, align 4, !tbaa !8
  br label %131

131:                                              ; preds = %117, %89
  br label %136

132:                                              ; preds = %73
  br label %133

133:                                              ; preds = %132
  %134 = load i32, ptr %27, align 4, !tbaa !8
  %135 = add i32 %134, 1
  store i32 %135, ptr %27, align 4, !tbaa !8
  br label %62, !llvm.loop !32

136:                                              ; preds = %131, %62
  br label %141

137:                                              ; preds = %50
  br label %138

138:                                              ; preds = %137
  %139 = load i32, ptr %26, align 4, !tbaa !8
  %140 = add i32 %139, 1
  store i32 %140, ptr %26, align 4, !tbaa !8
  br label %44, !llvm.loop !34

141:                                              ; preds = %136, %44
  br label %142

142:                                              ; preds = %141, %32
  %143 = load i32, ptr %24, align 4, !tbaa !8
  %144 = icmp eq i32 %143, 3
  br i1 %144, label %145, label %175

145:                                              ; preds = %142
  %146 = load i32, ptr %17, align 4, !tbaa !8
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %175

148:                                              ; preds = %145
  %149 = load ptr, ptr %23, align 8, !tbaa !10
  %150 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %149, i32 0, i32 8
  %151 = load ptr, ptr %150, align 8, !tbaa !35
  %152 = icmp eq ptr %151, null
  br i1 %152, label %153, label %159

153:                                              ; preds = %148
  %154 = load ptr, ptr %22, align 8, !tbaa !10
  store i32 5, ptr %154, align 4, !tbaa !8
  %155 = load i8, ptr %12, align 1, !tbaa !5
  %156 = icmp ne i8 %155, 0
  br i1 %156, label %157, label %158

157:                                              ; preds = %153
  call void @EXIT_CORE()
  br label %158

158:                                              ; preds = %157, %153
  store i32 1, ptr %28, align 4
  br label %232

159:                                              ; preds = %148
  %160 = load i8, ptr %12, align 1, !tbaa !5
  %161 = load i8, ptr %13, align 1, !tbaa !5
  %162 = load i8, ptr %14, align 1, !tbaa !5
  %163 = load i32, ptr %15, align 4, !tbaa !8
  %164 = load i32, ptr %16, align 4, !tbaa !8
  %165 = load i32, ptr %17, align 4, !tbaa !8
  %166 = load ptr, ptr %18, align 8, !tbaa !10
  %167 = load i32, ptr %19, align 4, !tbaa !8
  %168 = load i32, ptr %20, align 4, !tbaa !8
  %169 = load ptr, ptr %21, align 8, !tbaa !10
  %170 = load ptr, ptr %22, align 8, !tbaa !10
  call void @RAISE_PROCESS_ERROR(i8 noundef zeroext %160, i8 noundef zeroext %161, i8 noundef zeroext %162, i32 noundef %163, i32 noundef %164, i32 noundef %165, ptr noundef %166, i32 noundef %167, i32 noundef %168, ptr noundef %169, ptr noundef %170)
  %171 = load i8, ptr %12, align 1, !tbaa !5
  %172 = icmp ne i8 %171, 0
  br i1 %172, label %173, label %174

173:                                              ; preds = %159
  call void @EXIT_CORE()
  br label %174

174:                                              ; preds = %173, %159
  store i32 1, ptr %28, align 4
  br label %232

175:                                              ; preds = %145, %142
  %176 = load i32, ptr %24, align 4, !tbaa !8
  %177 = icmp eq i32 %176, 2
  br i1 %177, label %178, label %205

178:                                              ; preds = %175
  %179 = load ptr, ptr %23, align 8, !tbaa !10
  %180 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %179, i32 0, i32 8
  %181 = load ptr, ptr %180, align 8, !tbaa !35
  %182 = icmp eq ptr %181, null
  br i1 %182, label %183, label %189

183:                                              ; preds = %178
  %184 = load ptr, ptr %22, align 8, !tbaa !10
  store i32 5, ptr %184, align 4, !tbaa !8
  %185 = load i8, ptr %12, align 1, !tbaa !5
  %186 = icmp ne i8 %185, 0
  br i1 %186, label %187, label %188

187:                                              ; preds = %183
  call void @EXIT_CORE()
  br label %188

188:                                              ; preds = %187, %183
  store i32 1, ptr %28, align 4
  br label %232

189:                                              ; preds = %178
  %190 = load i8, ptr %12, align 1, !tbaa !5
  %191 = load i8, ptr %13, align 1, !tbaa !5
  %192 = load i8, ptr %14, align 1, !tbaa !5
  %193 = load i32, ptr %15, align 4, !tbaa !8
  %194 = load i32, ptr %16, align 4, !tbaa !8
  %195 = load i32, ptr %17, align 4, !tbaa !8
  %196 = load ptr, ptr %18, align 8, !tbaa !10
  %197 = load i32, ptr %19, align 4, !tbaa !8
  %198 = load i32, ptr %20, align 4, !tbaa !8
  %199 = load ptr, ptr %21, align 8, !tbaa !10
  %200 = load ptr, ptr %22, align 8, !tbaa !10
  call void @RAISE_PARTITION_ERROR(i8 noundef zeroext %190, i8 noundef zeroext %191, i8 noundef zeroext %192, i32 noundef %193, i32 noundef %194, i32 noundef %195, ptr noundef %196, i32 noundef %197, i32 noundef %198, ptr noundef %199, ptr noundef %200)
  %201 = load i8, ptr %12, align 1, !tbaa !5
  %202 = icmp ne i8 %201, 0
  br i1 %202, label %203, label %204

203:                                              ; preds = %189
  call void @EXIT_CORE()
  br label %204

204:                                              ; preds = %203, %189
  store i32 1, ptr %28, align 4
  br label %232

205:                                              ; preds = %175
  %206 = load i32, ptr %24, align 4, !tbaa !8
  %207 = icmp eq i32 %206, 1
  br i1 %207, label %208, label %224

208:                                              ; preds = %205
  %209 = load i8, ptr %12, align 1, !tbaa !5
  %210 = load i8, ptr %13, align 1, !tbaa !5
  %211 = load i8, ptr %14, align 1, !tbaa !5
  %212 = load i32, ptr %15, align 4, !tbaa !8
  %213 = load i32, ptr %16, align 4, !tbaa !8
  %214 = load i32, ptr %17, align 4, !tbaa !8
  %215 = load ptr, ptr %18, align 8, !tbaa !10
  %216 = load i32, ptr %19, align 4, !tbaa !8
  %217 = load i32, ptr %20, align 4, !tbaa !8
  %218 = load ptr, ptr %21, align 8, !tbaa !10
  %219 = load ptr, ptr %22, align 8, !tbaa !10
  call void @RAISE_MODULE_ERROR(i8 noundef zeroext %209, i8 noundef zeroext %210, i8 noundef zeroext %211, i32 noundef %212, i32 noundef %213, i32 noundef %214, ptr noundef %215, i32 noundef %216, i32 noundef %217, ptr noundef %218, ptr noundef %219)
  %220 = load i8, ptr %12, align 1, !tbaa !5
  %221 = icmp ne i8 %220, 0
  br i1 %221, label %222, label %223

222:                                              ; preds = %208
  call void @EXIT_CORE()
  br label %223

223:                                              ; preds = %222, %208
  store i32 1, ptr %28, align 4
  br label %232

224:                                              ; preds = %205
  br label %225

225:                                              ; preds = %224
  br label %226

226:                                              ; preds = %225
  %227 = load ptr, ptr %22, align 8, !tbaa !10
  store i32 5, ptr %227, align 4, !tbaa !8
  %228 = load i8, ptr %12, align 1, !tbaa !5
  %229 = icmp ne i8 %228, 0
  br i1 %229, label %230, label %231

230:                                              ; preds = %226
  call void @EXIT_CORE()
  br label %231

231:                                              ; preds = %230, %226
  store i32 0, ptr %28, align 4
  br label %232

232:                                              ; preds = %231, %223, %204, %188, %174, %158
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  %233 = load i32, ptr %28, align 4
  switch i32 %233, label %235 [
    i32 0, label %234
    i32 1, label %234
  ]

234:                                              ; preds = %232, %232
  ret void

235:                                              ; preds = %232
  unreachable
}

; Function Attrs: nounwind uwtable
declare hidden void @RAISE_PROCESS_ERROR(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @RAISE_PARTITION_ERROR(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @RAISE_MODULE_ERROR(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_MODULE_INFORMATION_TYPE", !11, i64 0, !14, i64 8, !9, i64 32, !9, i64 36, !9, i64 40, !15, i64 48, !9, i64 120, !11, i64 128, !11, i64 136, !16, i64 144, !17, i64 256, !17, i64 264, !17, i64 272, !18, i64 280}
!14 = !{!"_heapRECORD", !11, i64 0, !9, i64 8, !9, i64 12, !9, i64 16}
!15 = !{!"_CONTEXT_TYPE", !9, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !9, i64 32, !6, i64 36, !11, i64 40, !11, i64 48, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68}
!16 = !{!"_HEALTHMONITORINGCALLBACK_INFORMATION_TYPE", !6, i64 0, !11, i64 8, !9, i64 16, !15, i64 24, !6, i64 96, !6, i64 97, !6, i64 98, !6, i64 99, !9, i64 100, !9, i64 104}
!17 = !{!"long long", !6, i64 0}
!18 = !{!"_priorityqueueRECORD", !11, i64 0, !9, i64 8, !6, i64 12, !6, i64 13}
!19 = !{!20, !11, i64 104}
!20 = !{!"_MODULE_CONFIGURATION_TYPE", !9, i64 0, !11, i64 8, !9, i64 16, !11, i64 24, !9, i64 32, !11, i64 40, !9, i64 48, !11, i64 56, !9, i64 64, !11, i64 72, !9, i64 80, !17, i64 88, !11, i64 96, !11, i64 104, !9, i64 112, !11, i64 120, !11, i64 128}
!21 = !{!22, !9, i64 12}
!22 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_TYPE", !11, i64 0, !9, i64 8, !9, i64 12, !11, i64 16}
!23 = !{!22, !11, i64 16}
!24 = !{!25, !9, i64 0}
!25 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE", !9, i64 0, !9, i64 4, !11, i64 8}
!26 = !{!25, !9, i64 4}
!27 = !{!25, !11, i64 8}
!28 = !{!29, !9, i64 0}
!29 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12}
!30 = !{!29, !9, i64 4}
!31 = !{!29, !9, i64 8}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}
!35 = !{!13, !11, i64 136}


; 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._MODULE_INFORMATION_TYPE = type { ptr, %struct._heapRECORD, i32, i32, i32, %struct._CONTEXT_TYPE, i32, ptr, ptr, %struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE, i64, i64, i64, %struct._priorityqueueRECORD }
%struct._heapRECORD = type { ptr, i32, i32, i32 }
%struct._CONTEXT_TYPE = type { i32, ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i32, i32, i32 }
%struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE = type { i8, ptr, i32, %struct._CONTEXT_TYPE, i8, i8, i8, i8, i32, i32 }
%struct._priorityqueueRECORD = type { ptr, i32, i8, i8 }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE = type { i32, i32, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE = type { i32, i32, i32, i32 }

@CORE_MODULE_INFORMATION = external local_unnamed_addr global [2 x %struct._MODULE_INFORMATION_TYPE], align 16

declare void @ENTER_CORE() local_unnamed_addr #0

declare void @EXIT_CORE() local_unnamed_addr #0

declare i32 @PORT_GETCORE() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @RAISE_ERROR(i8 noundef zeroext %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i32 noundef %3, i32 noundef %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10) local_unnamed_addr #1 {
  %.not = icmp eq i8 %0, 0
  br i1 %.not, label %13, label %12

12:                                               ; preds = %11
  tail call void @ENTER_CORE() #2
  br label %13

13:                                               ; preds = %12, %11
  %14 = tail call i32 @PORT_GETCORE() #2
  %15 = zext i32 %14 to i64
  %16 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %15
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 104
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %.not79 = icmp eq ptr %19, null
  br i1 %.not79, label %.thread86, label %.preheader89

.preheader89:                                     ; preds = %13
  %20 = getelementptr inbounds i8, ptr %19, i64 12
  %21 = load i32, ptr %20, align 4, !tbaa !18
  %.not95 = icmp eq i32 %21, 0
  br i1 %.not95, label %.thread86, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader89
  %22 = getelementptr inbounds i8, ptr %19, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %wide.trip.count = zext i32 %21 to i64
  br label %25

24:                                               ; preds = %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.thread86, label %25, !llvm.loop !21

25:                                               ; preds = %.lr.ph, %24
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %24 ]
  %26 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %23, i64 %indvars.iv
  %27 = load i32, ptr %26, align 8, !tbaa !23
  %28 = icmp eq i32 %27, %3
  br i1 %28, label %.preheader, label %24

.preheader:                                       ; preds = %25
  %29 = getelementptr inbounds i8, ptr %26, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !25
  %.not96 = icmp eq i32 %30, 0
  br i1 %.not96, label %.thread86, label %.lr.ph94

.lr.ph94:                                         ; preds = %.preheader
  %31 = getelementptr inbounds i8, ptr %26, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !26
  %wide.trip.count105 = zext i32 %30 to i64
  br label %34

33:                                               ; preds = %34
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105
  br i1 %exitcond106.not, label %.thread86, label %34, !llvm.loop !27

34:                                               ; preds = %.lr.ph94, %33
  %indvars.iv102 = phi i64 [ 0, %.lr.ph94 ], [ %indvars.iv.next103, %33 ]
  %35 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %32, i64 %indvars.iv102
  %36 = load i32, ptr %35, align 4, !tbaa !28
  %37 = icmp eq i32 %36, %4
  br i1 %37, label %38, label %33

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %35, i64 4
  %40 = load i32, ptr %39, align 4, !tbaa !30
  %41 = getelementptr inbounds i8, ptr %35, i64 8
  %42 = load i32, ptr %41, align 4, !tbaa !31
  %.not80 = icmp eq i32 %42, 0
  %spec.select = select i1 %.not80, i32 %5, i32 %42
  %43 = icmp eq i32 %40, 3
  %44 = icmp ne i32 %spec.select, 0
  %or.cond = and i1 %43, %44
  br i1 %or.cond, label %45, label %51

45:                                               ; preds = %38
  %46 = getelementptr inbounds i8, ptr %16, i64 136
  %47 = load ptr, ptr %46, align 8, !tbaa !32
  %48 = icmp eq ptr %47, null
  br i1 %48, label %49, label %50

49:                                               ; preds = %45
  store i32 5, ptr %10, align 4, !tbaa !33
  br i1 %.not, label %59, label %.sink.split

50:                                               ; preds = %45
  tail call void @RAISE_PROCESS_ERROR(i8 noundef zeroext %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i32 noundef %3, i32 noundef %4, i32 noundef %spec.select, ptr noundef %6, i32 noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10)
  br i1 %.not, label %59, label %.sink.split

51:                                               ; preds = %38
  switch i32 %40, label %.thread86 [
    i32 2, label %52
    i32 1, label %58
  ]

52:                                               ; preds = %51
  %53 = getelementptr inbounds i8, ptr %16, i64 136
  %54 = load ptr, ptr %53, align 8, !tbaa !32
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %57

56:                                               ; preds = %52
  store i32 5, ptr %10, align 4, !tbaa !33
  br i1 %.not, label %59, label %.sink.split

57:                                               ; preds = %52
  tail call void @RAISE_PARTITION_ERROR(i8 noundef zeroext %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i32 noundef %3, i32 noundef %4, i32 noundef %spec.select, ptr noundef %6, i32 noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10)
  br i1 %.not, label %59, label %.sink.split

58:                                               ; preds = %51
  tail call void @RAISE_MODULE_ERROR(i8 noundef zeroext %0, i8 noundef zeroext %1, i8 noundef zeroext %2, i32 noundef %3, i32 noundef %4, i32 noundef %spec.select, ptr noundef %6, i32 noundef %7, i32 noundef %8, ptr noundef %9, ptr noundef %10)
  br i1 %.not, label %59, label %.sink.split

.thread86:                                        ; preds = %24, %33, %.preheader89, %.preheader, %13, %51
  store i32 5, ptr %10, align 4, !tbaa !33
  br i1 %.not, label %59, label %.sink.split

.sink.split:                                      ; preds = %.thread86, %58, %57, %56, %50, %49
  tail call void @EXIT_CORE() #2
  br label %59

59:                                               ; preds = %.sink.split, %.thread86, %58, %57, %56, %50, %49
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @RAISE_PROCESS_ERROR(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @RAISE_PARTITION_ERROR(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @RAISE_MODULE_ERROR(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #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 = { 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 #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_MODULE_INFORMATION_TYPE", !7, i64 0, !10, i64 8, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 48, !11, i64 120, !7, i64 128, !7, i64 136, !13, i64 144, !14, i64 256, !14, i64 264, !14, i64 272, !15, i64 280}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_heapRECORD", !7, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_CONTEXT_TYPE", !11, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !8, i64 36, !7, i64 40, !7, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68}
!13 = !{!"_HEALTHMONITORINGCALLBACK_INFORMATION_TYPE", !8, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 96, !8, i64 97, !8, i64 98, !8, i64 99, !11, i64 100, !11, i64 104}
!14 = !{!"long long", !8, i64 0}
!15 = !{!"_priorityqueueRECORD", !7, i64 0, !11, i64 8, !8, i64 12, !8, i64 13}
!16 = !{!17, !7, i64 104}
!17 = !{!"_MODULE_CONFIGURATION_TYPE", !11, i64 0, !7, i64 8, !11, i64 16, !7, i64 24, !11, i64 32, !7, i64 40, !11, i64 48, !7, i64 56, !11, i64 64, !7, i64 72, !11, i64 80, !14, i64 88, !7, i64 96, !7, i64 104, !11, i64 112, !7, i64 120, !7, i64 128}
!18 = !{!19, !11, i64 12}
!19 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_TYPE", !7, i64 0, !11, i64 8, !11, i64 12, !7, i64 16}
!20 = !{!19, !7, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !11, i64 0}
!24 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE", !11, i64 0, !11, i64 4, !7, i64 8}
!25 = !{!24, !11, i64 4}
!26 = !{!24, !7, i64 8}
!27 = distinct !{!27, !22}
!28 = !{!29, !11, i64 0}
!29 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!30 = !{!29, !11, i64 4}
!31 = !{!29, !11, i64 8}
!32 = !{!6, !7, i64 136}
!33 = !{!11, !11, i64 0}


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