; LLVM IR from FrancesoM/Bisc8FX :: sdk_projects/bisc8_platform/zynq_fsbl (image_mover)

; 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.StructPartHeader = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, [1 x i32], i32, [4 x i32], i32 }
%struct.XDcfg = type { %struct.XDcfg_Config, i32, i32, ptr, ptr }
%struct.XDcfg_Config = type { i16, i32 }

@BitstreamFlag = external dso_local global i8, align 1
@ApplicationFlag = external dso_local global i8, align 1
@Silicon_Version = external global i32, align 4
@DcfgInstPtr = external global ptr, align 8
@PartitionCount = external dso_local global i32, align 4
@PartitionHeader = external dso_local global [14 x %struct.StructPartHeader], align 16
@PLPartitionFlag = external dso_local global i8, align 1
@PSPartitionFlag = external dso_local global i8, align 1
@.str = external hidden unnamed_addr constant [49 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@EncryptedPartitionFlag = external dso_local global i8, align 1
@PartitionChecksumFlag = external dso_local global i8, align 1
@SignedPartitionFlag = external dso_local global i8, align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LoadBootImage() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  store i8 0, ptr %14, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i8 0, ptr @BitstreamFlag, align 1, !tbaa !9
  store i8 0, ptr @ApplicationFlag, align 1, !tbaa !9
  %19 = call i32 @Xil_In32(i64 noundef 4160750168)
  store i32 %19, ptr %1, align 4, !tbaa !5
  %20 = load i32, ptr @Silicon_Version, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %32

22:                                               ; preds = %0
  %23 = load i32, ptr %1, align 4, !tbaa !5
  %24 = and i32 %23, -268435456
  %25 = icmp eq i32 %24, -268435456
  br i1 %25, label %26, label %30

26:                                               ; preds = %22
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = and i32 %27, 268435455
  store i32 %28, ptr %1, align 4, !tbaa !5
  %29 = load i32, ptr %1, align 4, !tbaa !5
  call void @Xil_Out32(i64 noundef 4160750168, i32 noundef %29)
  br label %30

30:                                               ; preds = %26, %22
  %31 = load i32, ptr inttoptr (i64 4294967288 to ptr), align 4, !tbaa !5
  store i32 %31, ptr %3, align 4, !tbaa !5
  br label %43

32:                                               ; preds = %0
  %33 = load ptr, ptr @DcfgInstPtr, align 8, !tbaa !10
  %34 = getelementptr inbounds %struct.XDcfg, ptr %33, i32 0, i32 0
  %35 = getelementptr inbounds %struct.XDcfg_Config, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = add i32 %36, 44
  %38 = zext i32 %37 to i64
  %39 = call i32 @Xil_In32(i64 noundef %38)
  store i32 %39, ptr %2, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = and i32 %40, 8191
  %42 = mul i32 %41, 32768
  store i32 %42, ptr %3, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %32, %30
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = call i32 @GetPartitionHeaderInfo(i32 noundef %44)
  store i32 %45, ptr %15, align 4, !tbaa !5
  %46 = load i32, ptr %15, align 4, !tbaa !5
  %47 = zext i32 %46 to i64
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  call void @OutputStatus(i32 noundef 40974)
  call void @FsblFallback()
  br label %50

50:                                               ; preds = %49, %43
  %51 = load i32, ptr @Silicon_Version, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %63

53:                                               ; preds = %50
  %54 = load i32, ptr @Silicon_Version, align 4, !tbaa !5
  %55 = icmp ne i32 %54, 1
  br i1 %55, label %56, label %63

56:                                               ; preds = %53
  %57 = call i32 @Xil_In32(i64 noundef 4160802832)
  store i32 %57, ptr %17, align 4, !tbaa !5
  %58 = load i32, ptr %17, align 4, !tbaa !5
  %59 = and i32 %58, 1024
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %62

61:                                               ; preds = %56
  call void @OutputStatus(i32 noundef 40977)
  call void @FsblFallback()
  br label %62

62:                                               ; preds = %61, %56
  br label %63

63:                                               ; preds = %62, %53, %50
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %302, %107, %63
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = load i32, ptr @PartitionCount, align 4, !tbaa !5
  %67 = icmp ult i32 %65, %66
  br i1 %67, label %68, label %305

68:                                               ; preds = %64
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = zext i32 %69 to i64
  %71 = getelementptr inbounds [14 x %struct.StructPartHeader], ptr @PartitionHeader, i64 0, i64 %70
  store ptr %71, ptr %16, align 8, !tbaa !10
  %72 = load ptr, ptr %16, align 8, !tbaa !10
  call void @HeaderDump(ptr noundef %72)
  %73 = load ptr, ptr %16, align 8, !tbaa !10
  %74 = call i32 @ValidateHeader(ptr noundef %73)
  store i32 %74, ptr %15, align 4, !tbaa !5
  %75 = load i32, ptr %15, align 4, !tbaa !5
  %76 = zext i32 %75 to i64
  %77 = icmp ne i64 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %68
  call void @OutputStatus(i32 noundef 40973)
  call void @FsblFallback()
  br label %79

79:                                               ; preds = %78, %68
  %80 = load ptr, ptr %16, align 8, !tbaa !10
  %81 = getelementptr inbounds %struct.StructPartHeader, ptr %80, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !16
  store i32 %82, ptr %5, align 4, !tbaa !5
  %83 = load ptr, ptr %16, align 8, !tbaa !10
  %84 = getelementptr inbounds %struct.StructPartHeader, ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 4, !tbaa !18
  store i32 %85, ptr %6, align 4, !tbaa !5
  %86 = load ptr, ptr %16, align 8, !tbaa !10
  %87 = getelementptr inbounds %struct.StructPartHeader, ptr %86, i32 0, i32 4
  %88 = load i32, ptr %87, align 4, !tbaa !19
  store i32 %88, ptr %8, align 4, !tbaa !5
  %89 = load ptr, ptr %16, align 8, !tbaa !10
  %90 = getelementptr inbounds %struct.StructPartHeader, ptr %89, i32 0, i32 6
  %91 = load i32, ptr %90, align 4, !tbaa !20
  store i32 %91, ptr %9, align 4, !tbaa !5
  %92 = load ptr, ptr %16, align 8, !tbaa !10
  %93 = getelementptr inbounds %struct.StructPartHeader, ptr %92, i32 0, i32 3
  %94 = load i32, ptr %93, align 4, !tbaa !21
  store i32 %94, ptr %11, align 4, !tbaa !5
  %95 = load ptr, ptr %16, align 8, !tbaa !10
  %96 = getelementptr inbounds %struct.StructPartHeader, ptr %95, i32 0, i32 8
  %97 = load i32, ptr %96, align 4, !tbaa !22
  store i32 %97, ptr %13, align 4, !tbaa !5
  %98 = load ptr, ptr %16, align 8, !tbaa !10
  %99 = getelementptr inbounds %struct.StructPartHeader, ptr %98, i32 0, i32 5
  %100 = load i32, ptr %99, align 4, !tbaa !23
  store i32 %100, ptr %12, align 4, !tbaa !5
  %101 = load ptr, ptr %16, align 8, !tbaa !10
  %102 = getelementptr inbounds %struct.StructPartHeader, ptr %101, i32 0, i32 2
  %103 = load i32, ptr %102, align 4, !tbaa !24
  store i32 %103, ptr %7, align 4, !tbaa !5
  %104 = load i32, ptr %9, align 4, !tbaa !5
  %105 = and i32 %104, 196608
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %110

107:                                              ; preds = %79
  %108 = load i32, ptr %4, align 4, !tbaa !5
  %109 = add i32 %108, 1
  store i32 %109, ptr %4, align 4, !tbaa !5
  br label %64, !llvm.loop !25

110:                                              ; preds = %79
  %111 = load i32, ptr %9, align 4, !tbaa !5
  %112 = and i32 %111, 32
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %120

114:                                              ; preds = %110
  store i8 1, ptr @PLPartitionFlag, align 1, !tbaa !9
  store i8 0, ptr @PSPartitionFlag, align 1, !tbaa !9
  store i8 1, ptr @BitstreamFlag, align 1, !tbaa !9
  %115 = load i8, ptr @ApplicationFlag, align 1, !tbaa !9
  %116 = zext i8 %115 to i32
  %117 = icmp eq i32 %116, 1
  br i1 %117, label %118, label %119

118:                                              ; preds = %114
  call void (ptr, ...) @xil_printf(ptr noundef @.str)
  call void (ptr, ...) @xil_printf(ptr noundef @.str.1)
  br label %305

119:                                              ; preds = %114
  br label %120

120:                                              ; preds = %119, %110
  %121 = load i32, ptr %9, align 4, !tbaa !5
  %122 = and i32 %121, 16
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %125

124:                                              ; preds = %120
  store i8 1, ptr @PSPartitionFlag, align 1, !tbaa !9
  store i8 0, ptr @PLPartitionFlag, align 1, !tbaa !9
  store i8 1, ptr @ApplicationFlag, align 1, !tbaa !9
  br label %125

125:                                              ; preds = %124, %120
  %126 = load i32, ptr %5, align 4, !tbaa !5
  %127 = load i32, ptr %6, align 4, !tbaa !5
  %128 = icmp ne i32 %126, %127
  br i1 %128, label %129, label %130

129:                                              ; preds = %125
  store i8 1, ptr @EncryptedPartitionFlag, align 1, !tbaa !9
  br label %131

130:                                              ; preds = %125
  store i8 0, ptr @EncryptedPartitionFlag, align 1, !tbaa !9
  br label %131

131:                                              ; preds = %130, %129
  %132 = load ptr, ptr @DcfgInstPtr, align 8, !tbaa !10
  %133 = getelementptr inbounds %struct.XDcfg, ptr %132, i32 0, i32 0
  %134 = getelementptr inbounds %struct.XDcfg_Config, ptr %133, i32 0, i32 1
  %135 = load i32, ptr %134, align 4, !tbaa !12
  %136 = add i32 %135, 20
  %137 = zext i32 %136 to i64
  %138 = call i32 @Xil_In32(i64 noundef %137)
  %139 = and i32 %138, 4
  store i32 %139, ptr %18, align 4, !tbaa !5
  %140 = load i32, ptr %18, align 4, !tbaa !5
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %147

142:                                              ; preds = %131
  %143 = load i8, ptr @EncryptedPartitionFlag, align 1, !tbaa !9
  %144 = zext i8 %143 to i32
  %145 = icmp eq i32 %144, 0
  br i1 %145, label %146, label %147

146:                                              ; preds = %142
  call void @OutputStatus(i32 noundef 40979)
  call void @FsblFallback()
  br label %147

147:                                              ; preds = %146, %142, %131
  %148 = load i32, ptr %9, align 4, !tbaa !5
  %149 = and i32 %148, 28672
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %152

151:                                              ; preds = %147
  store i8 1, ptr @PartitionChecksumFlag, align 1, !tbaa !9
  br label %153

152:                                              ; preds = %147
  store i8 0, ptr @PartitionChecksumFlag, align 1, !tbaa !9
  br label %153

153:                                              ; preds = %152, %151
  %154 = load i32, ptr %9, align 4, !tbaa !5
  %155 = and i32 %154, 32768
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %158

157:                                              ; preds = %153
  store i8 1, ptr @SignedPartitionFlag, align 1, !tbaa !9
  br label %159

158:                                              ; preds = %153
  store i8 0, ptr @SignedPartitionFlag, align 1, !tbaa !9
  br label %159

159:                                              ; preds = %158, %157
  %160 = load i8, ptr @PSPartitionFlag, align 1, !tbaa !9
  %161 = zext i8 %160 to i32
  %162 = icmp eq i32 %161, 1
  br i1 %162, label %163, label %180

163:                                              ; preds = %159
  %164 = load i32, ptr %11, align 4, !tbaa !5
  %165 = icmp ult i32 %164, 1048576
  br i1 %165, label %166, label %180

166:                                              ; preds = %163
  %167 = load i32, ptr %11, align 4, !tbaa !5
  %168 = icmp eq i32 %167, 0
  br i1 %168, label %169, label %178

169:                                              ; preds = %166
  %170 = load i8, ptr @SignedPartitionFlag, align 1, !tbaa !9
  %171 = zext i8 %170 to i32
  %172 = icmp eq i32 %171, 1
  br i1 %172, label %178, label %173

173:                                              ; preds = %169
  %174 = load i8, ptr @EncryptedPartitionFlag, align 1, !tbaa !9
  %175 = zext i8 %174 to i32
  %176 = icmp eq i32 %175, 1
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  br label %305

178:                                              ; preds = %173, %169, %166
  call void @OutputStatus(i32 noundef 40975)
  call void @FsblFallback()
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179, %163, %159
  %181 = load i8, ptr @PSPartitionFlag, align 1, !tbaa !9
  %182 = zext i8 %181 to i32
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %188

184:                                              ; preds = %180
  %185 = load i32, ptr %11, align 4, !tbaa !5
  %186 = icmp ugt i32 %185, 536870911
  br i1 %186, label %187, label %188

187:                                              ; preds = %184
  call void @OutputStatus(i32 noundef 40975)
  call void @FsblFallback()
  br label %188

188:                                              ; preds = %187, %184, %180
  %189 = load i8, ptr @PSPartitionFlag, align 1, !tbaa !9
  %190 = zext i8 %189 to i32
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %199

192:                                              ; preds = %188
  %193 = load i8, ptr %14, align 1, !tbaa !9
  %194 = icmp ne i8 %193, 0
  br i1 %194, label %199, label %195

195:                                              ; preds = %192
  %196 = load i8, ptr %14, align 1, !tbaa !9
  %197 = add i8 %196, 1
  store i8 %197, ptr %14, align 1, !tbaa !9
  %198 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %198, ptr %10, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %195, %192, %188
  %200 = load i8, ptr @PLPartitionFlag, align 1, !tbaa !9
  %201 = icmp ne i8 %200, 0
  br i1 %201, label %202, label %209

202:                                              ; preds = %199
  %203 = call i32 @FsblHookBeforeBitstreamDload()
  store i32 %203, ptr %15, align 4, !tbaa !5
  %204 = load i32, ptr %15, align 4, !tbaa !5
  %205 = zext i32 %204 to i64
  %206 = icmp ne i64 %205, 0
  br i1 %206, label %207, label %208

207:                                              ; preds = %202
  call void @OutputStatus(i32 noundef 41986)
  call void @FsblFallback()
  br label %208

208:                                              ; preds = %207, %202
  br label %209

209:                                              ; preds = %208, %199
  %210 = load i32, ptr %3, align 4, !tbaa !5
  %211 = load ptr, ptr %16, align 8, !tbaa !10
  %212 = call i32 @PartitionMove(i32 noundef %210, ptr noundef %211)
  store i32 %212, ptr %15, align 4, !tbaa !5
  %213 = load i32, ptr %15, align 4, !tbaa !5
  %214 = zext i32 %213 to i64
  %215 = icmp ne i64 %214, 0
  br i1 %215, label %216, label %217

216:                                              ; preds = %209
  call void @OutputStatus(i32 noundef 40971)
  call void @FsblFallback()
  br label %217

217:                                              ; preds = %216, %209
  %218 = load i8, ptr @SignedPartitionFlag, align 1, !tbaa !9
  %219 = zext i8 %218 to i32
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %225, label %221

221:                                              ; preds = %217
  %222 = load i8, ptr @PartitionChecksumFlag, align 1, !tbaa !9
  %223 = zext i8 %222 to i32
  %224 = icmp ne i32 %223, 0
  br i1 %224, label %225, label %292

225:                                              ; preds = %221, %217
  %226 = load i8, ptr @PLPartitionFlag, align 1, !tbaa !9
  %227 = icmp ne i8 %226, 0
  br i1 %227, label %228, label %229

228:                                              ; preds = %225
  store i32 1048576, ptr %12, align 4, !tbaa !5
  br label %231

229:                                              ; preds = %225
  %230 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %230, ptr %12, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %229, %228
  %232 = load i8, ptr @PartitionChecksumFlag, align 1, !tbaa !9
  %233 = icmp ne i8 %232, 0
  br i1 %233, label %234, label %248

234:                                              ; preds = %231
  %235 = load i32, ptr %12, align 4, !tbaa !5
  %236 = load i32, ptr %7, align 4, !tbaa !5
  %237 = shl i32 %236, 2
  %238 = load i32, ptr %3, align 4, !tbaa !5
  %239 = load i32, ptr %13, align 4, !tbaa !5
  %240 = shl i32 %239, 2
  %241 = add i32 %238, %240
  %242 = call i32 @ValidateParition(i32 noundef %235, i32 noundef %237, i32 noundef %241)
  store i32 %242, ptr %15, align 4, !tbaa !5
  %243 = load i32, ptr %15, align 4, !tbaa !5
  %244 = zext i32 %243 to i64
  %245 = icmp ne i64 %244, 0
  br i1 %245, label %246, label %247

246:                                              ; preds = %234
  call void @OutputStatus(i32 noundef 40976)
  call void @FsblFallback()
  br label %247

247:                                              ; preds = %246, %234
  br label %248

248:                                              ; preds = %247, %231
  %249 = load i8, ptr @SignedPartitionFlag, align 1, !tbaa !9
  %250 = zext i8 %249 to i32
  %251 = icmp eq i32 %250, 1
  br i1 %251, label %252, label %253

252:                                              ; preds = %248
  call void @OutputStatus(i32 noundef 40977)
  call void @FsblFallback()
  br label %253

253:                                              ; preds = %252, %248
  %254 = load i8, ptr @EncryptedPartitionFlag, align 1, !tbaa !9
  %255 = zext i8 %254 to i32
  %256 = icmp ne i32 %255, 0
  br i1 %256, label %257, label %271

257:                                              ; preds = %253
  %258 = load i8, ptr @PSPartitionFlag, align 1, !tbaa !9
  %259 = zext i8 %258 to i32
  %260 = icmp ne i32 %259, 0
  br i1 %260, label %261, label %271

261:                                              ; preds = %257
  %262 = load i32, ptr %12, align 4, !tbaa !5
  %263 = load i32, ptr %5, align 4, !tbaa !5
  %264 = load i32, ptr %6, align 4, !tbaa !5
  %265 = call i32 @DecryptPartition(i32 noundef %262, i32 noundef %263, i32 noundef %264)
  store i32 %265, ptr %15, align 4, !tbaa !5
  %266 = load i32, ptr %15, align 4, !tbaa !5
  %267 = zext i32 %266 to i64
  %268 = icmp ne i64 %267, 0
  br i1 %268, label %269, label %270

269:                                              ; preds = %261
  call void @OutputStatus(i32 noundef 40963)
  call void @FsblFallback()
  br label %270

270:                                              ; preds = %269, %261
  br label %271

271:                                              ; preds = %270, %257, %253
  %272 = load i8, ptr @PLPartitionFlag, align 1, !tbaa !9
  %273 = icmp ne i8 %272, 0
  br i1 %273, label %274, label %291

274:                                              ; preds = %271
  %275 = load i32, ptr %12, align 4, !tbaa !5
  %276 = zext i32 %275 to i64
  %277 = inttoptr i64 %276 to ptr
  %278 = load i32, ptr %11, align 4, !tbaa !5
  %279 = zext i32 %278 to i64
  %280 = inttoptr i64 %279 to ptr
  %281 = load i32, ptr %6, align 4, !tbaa !5
  %282 = load i32, ptr %5, align 4, !tbaa !5
  %283 = load i8, ptr @EncryptedPartitionFlag, align 1, !tbaa !9
  %284 = zext i8 %283 to i32
  %285 = call i32 @PcapLoadPartition(ptr noundef %277, ptr noundef %280, i32 noundef %281, i32 noundef %282, i32 noundef %284)
  store i32 %285, ptr %15, align 4, !tbaa !5
  %286 = load i32, ptr %15, align 4, !tbaa !5
  %287 = zext i32 %286 to i64
  %288 = icmp ne i64 %287, 0
  br i1 %288, label %289, label %290

289:                                              ; preds = %274
  call void @OutputStatus(i32 noundef 40964)
  call void @FsblFallback()
  br label %290

290:                                              ; preds = %289, %274
  br label %291

291:                                              ; preds = %290, %271
  br label %292

292:                                              ; preds = %291, %221
  %293 = load i8, ptr @PLPartitionFlag, align 1, !tbaa !9
  %294 = icmp ne i8 %293, 0
  br i1 %294, label %295, label %302

295:                                              ; preds = %292
  %296 = call i32 @FsblHookAfterBitstreamDload()
  store i32 %296, ptr %15, align 4, !tbaa !5
  %297 = load i32, ptr %15, align 4, !tbaa !5
  %298 = zext i32 %297 to i64
  %299 = icmp ne i64 %298, 0
  br i1 %299, label %300, label %301

300:                                              ; preds = %295
  call void @OutputStatus(i32 noundef 41987)
  call void @FsblFallback()
  br label %301

301:                                              ; preds = %300, %295
  br label %302

302:                                              ; preds = %301, %292
  %303 = load i32, ptr %4, align 4, !tbaa !5
  %304 = add i32 %303, 1
  store i32 %304, ptr %4, align 4, !tbaa !5
  br label %64, !llvm.loop !25

305:                                              ; preds = %177, %118, %64
  %306 = load i32, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret i32 %306
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @Xil_In32(i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Xil_Out32(i64 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @GetPartitionHeaderInfo(i32 noundef) #0

declare void @OutputStatus(i32 noundef) #3

declare void @FsblFallback() #3

; Function Attrs: nounwind uwtable
declare dso_local void @HeaderDump(ptr noundef) #0

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

declare void @xil_printf(ptr noundef, ...) #3

declare i32 @FsblHookBeforeBitstreamDload() #3

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

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

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

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

declare i32 @FsblHookAfterBitstreamDload() #3

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 4}
!13 = !{!"", !14, i64 0, !6, i64 8, !6, i64 12, !11, i64 16, !11, i64 24}
!14 = !{!"", !15, i64 0, !6, i64 4}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !6, i64 4}
!17 = !{!"StructPartHeader", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !7, i64 36, !6, i64 40, !7, i64 44, !6, i64 60}
!18 = !{!17, !6, i64 0}
!19 = !{!17, !6, i64 16}
!20 = !{!17, !6, i64 24}
!21 = !{!17, !6, i64 12}
!22 = !{!17, !6, i64 32}
!23 = !{!17, !6, i64 20}
!24 = !{!17, !6, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


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

%struct.StructPartHeader = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, [1 x i32], i32, [4 x i32], i32 }

@BitstreamFlag = external dso_local local_unnamed_addr global i8, align 1
@ApplicationFlag = external dso_local local_unnamed_addr global i8, align 1
@Silicon_Version = external local_unnamed_addr global i32, align 4
@DcfgInstPtr = external local_unnamed_addr global ptr, align 8
@PartitionCount = external dso_local local_unnamed_addr global i32, align 4
@PartitionHeader = external dso_local global [14 x %struct.StructPartHeader], align 16
@PLPartitionFlag = external dso_local local_unnamed_addr global i8, align 1
@PSPartitionFlag = external dso_local local_unnamed_addr global i8, align 1
@.str = external hidden unnamed_addr constant [49 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@EncryptedPartitionFlag = external dso_local local_unnamed_addr global i8, align 1
@PartitionChecksumFlag = external dso_local local_unnamed_addr global i8, align 1
@SignedPartitionFlag = external dso_local local_unnamed_addr global i8, align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @LoadBootImage() local_unnamed_addr #0 {
  store i8 0, ptr @BitstreamFlag, align 1, !tbaa !5
  store i8 0, ptr @ApplicationFlag, align 1, !tbaa !5
  %1 = tail call i32 @Xil_In32(i64 noundef 4160750168)
  %2 = load i32, ptr @Silicon_Version, align 4, !tbaa !8
  %3 = icmp eq i32 %2, 0
  br i1 %3, label %4, label %10

4:                                                ; preds = %0
  %5 = icmp ugt i32 %1, -268435457
  br i1 %5, label %6, label %8

6:                                                ; preds = %4
  %7 = and i32 %1, 268435455
  tail call void @Xil_Out32(i64 noundef 4160750168, i32 noundef %7)
  br label %8

8:                                                ; preds = %6, %4
  %9 = load i32, ptr inttoptr (i64 4294967288 to ptr), align 8, !tbaa !8
  br label %19

10:                                               ; preds = %0
  %11 = load ptr, ptr @DcfgInstPtr, align 8, !tbaa !10
  %12 = getelementptr inbounds i8, ptr %11, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !12
  %14 = add i32 %13, 44
  %15 = zext i32 %14 to i64
  %16 = tail call i32 @Xil_In32(i64 noundef %15)
  %17 = shl i32 %16, 15
  %18 = and i32 %17, 268402688
  br label %19

19:                                               ; preds = %10, %8
  %.0 = phi i32 [ %9, %8 ], [ %18, %10 ]
  %20 = tail call i32 @GetPartitionHeaderInfo(i32 noundef %.0)
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %22, label %21

21:                                               ; preds = %19
  tail call void @OutputStatus(i32 noundef 40974) #3
  tail call void @FsblFallback() #3
  br label %22

22:                                               ; preds = %21, %19
  %23 = load i32, ptr @Silicon_Version, align 4
  %or.cond = icmp ugt i32 %23, 1
  br i1 %or.cond, label %24, label %28

24:                                               ; preds = %22
  %25 = tail call i32 @Xil_In32(i64 noundef 4160802832)
  %26 = and i32 %25, 1024
  %.not84 = icmp eq i32 %26, 0
  br i1 %.not84, label %28, label %27

27:                                               ; preds = %24
  tail call void @OutputStatus(i32 noundef 40977) #3
  tail call void @FsblFallback() #3
  br label %28

28:                                               ; preds = %24, %27, %22
  %29 = load i32, ptr @PartitionCount, align 4, !tbaa !8
  %30 = icmp ugt i32 %29, 1
  br i1 %30, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %28, %.thread109
  %.078.ph128 = phi i8 [ %spec.select106, %.thread109 ], [ 0, %28 ]
  %.079.ph127 = phi i32 [ %143, %.thread109 ], [ 1, %28 ]
  %.081.ph126 = phi i32 [ %spec.select, %.thread109 ], [ 0, %28 ]
  %31 = zext i32 %.079.ph127 to i64
  br label %32

32:                                               ; preds = %.lr.ph, %51
  %indvars.iv = phi i64 [ %31, %.lr.ph ], [ %indvars.iv.next, %51 ]
  %33 = getelementptr inbounds [14 x %struct.StructPartHeader], ptr @PartitionHeader, i64 0, i64 %indvars.iv
  tail call void @HeaderDump(ptr noundef nonnull %33)
  %34 = tail call i32 @ValidateHeader(ptr noundef nonnull %33)
  %.not85 = icmp eq i32 %34, 0
  br i1 %.not85, label %36, label %35

35:                                               ; preds = %32
  tail call void @OutputStatus(i32 noundef 40973) #3
  tail call void @FsblFallback() #3
  br label %36

36:                                               ; preds = %35, %32
  %37 = getelementptr inbounds i8, ptr %33, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !16
  %39 = load i32, ptr %33, align 16, !tbaa !18
  %40 = getelementptr inbounds i8, ptr %33, i64 16
  %41 = load i32, ptr %40, align 16, !tbaa !19
  %42 = getelementptr inbounds i8, ptr %33, i64 24
  %43 = load i32, ptr %42, align 8, !tbaa !20
  %44 = getelementptr inbounds i8, ptr %33, i64 12
  %45 = load i32, ptr %44, align 4, !tbaa !21
  %46 = getelementptr inbounds i8, ptr %33, i64 32
  %47 = load i32, ptr %46, align 16, !tbaa !22
  %48 = getelementptr inbounds i8, ptr %33, i64 8
  %49 = load i32, ptr %48, align 8, !tbaa !23
  %50 = and i32 %43, 196608
  %.not86 = icmp eq i32 %50, 0
  br i1 %.not86, label %55, label %51

51:                                               ; preds = %36
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %52 = load i32, ptr @PartitionCount, align 4, !tbaa !8
  %53 = zext i32 %52 to i64
  %54 = icmp ult i64 %indvars.iv.next, %53
  br i1 %54, label %32, label %.loopexit, !llvm.loop !24

55:                                               ; preds = %36
  %56 = trunc nuw i64 %indvars.iv to i32
  %57 = and i32 %43, 32
  %.not87 = icmp eq i32 %57, 0
  br i1 %.not87, label %62, label %58

58:                                               ; preds = %55
  store i8 1, ptr @PLPartitionFlag, align 1, !tbaa !5
  store i8 0, ptr @PSPartitionFlag, align 1, !tbaa !5
  store i8 1, ptr @BitstreamFlag, align 1, !tbaa !5
  %59 = load i8, ptr @ApplicationFlag, align 1, !tbaa !5
  %60 = icmp eq i8 %59, 1
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  tail call void (ptr, ...) @xil_printf(ptr noundef nonnull @.str) #3
  tail call void (ptr, ...) @xil_printf(ptr noundef nonnull @.str.1) #3
  br label %.loopexit

62:                                               ; preds = %58, %55
  %63 = and i32 %43, 16
  %.not88 = icmp eq i32 %63, 0
  br i1 %.not88, label %65, label %64

64:                                               ; preds = %62
  store i8 1, ptr @PSPartitionFlag, align 1, !tbaa !5
  store i8 0, ptr @PLPartitionFlag, align 1, !tbaa !5
  store i8 1, ptr @ApplicationFlag, align 1, !tbaa !5
  br label %65

65:                                               ; preds = %64, %62
  %.not89 = icmp ne i32 %38, %39
  %. = zext i1 %.not89 to i8
  store i8 %., ptr @EncryptedPartitionFlag, align 1, !tbaa !5
  %66 = load ptr, ptr @DcfgInstPtr, align 8, !tbaa !10
  %67 = getelementptr inbounds i8, ptr %66, i64 4
  %68 = load i32, ptr %67, align 4, !tbaa !12
  %69 = add i32 %68, 20
  %70 = zext i32 %69 to i64
  %71 = tail call i32 @Xil_In32(i64 noundef %70)
  %72 = and i32 %71, 4
  %73 = icmp ne i32 %72, 0
  %74 = load i8, ptr @EncryptedPartitionFlag, align 1
  %75 = icmp eq i8 %74, 0
  %or.cond4 = select i1 %73, i1 %75, i1 false
  br i1 %or.cond4, label %76, label %77

76:                                               ; preds = %65
  tail call void @OutputStatus(i32 noundef 40979) #3
  tail call void @FsblFallback() #3
  br label %77

77:                                               ; preds = %76, %65
  %78 = and i32 %43, 28672
  %.not90 = icmp ne i32 %78, 0
  %.105 = zext i1 %.not90 to i8
  store i8 %.105, ptr @PartitionChecksumFlag, align 1, !tbaa !5
  %79 = lshr i32 %43, 15
  %80 = trunc i32 %79 to i8
  %storemerge93 = and i8 %80, 1
  store i8 %storemerge93, ptr @SignedPartitionFlag, align 1, !tbaa !5
  %81 = load i8, ptr @PSPartitionFlag, align 1, !tbaa !5
  %82 = icmp eq i8 %81, 1
  %83 = icmp ult i32 %45, 1048576
  %or.cond6 = select i1 %82, i1 %83, i1 false
  br i1 %or.cond6, label %84, label %89

84:                                               ; preds = %77
  %85 = icmp ne i32 %45, 0
  %86 = icmp ne i8 %storemerge93, 0
  %or.cond9 = or i1 %85, %86
  %87 = load i8, ptr @EncryptedPartitionFlag, align 1
  %88 = icmp eq i8 %87, 1
  %or.cond12 = select i1 %or.cond9, i1 true, i1 %88
  br i1 %or.cond12, label %.sink.split, label %.loopexit

89:                                               ; preds = %77
  %90 = icmp ne i8 %81, 0
  %91 = icmp ugt i32 %45, 536870911
  %or.cond14 = select i1 %90, i1 %91, i1 false
  br i1 %or.cond14, label %.sink.split, label %92

.sink.split:                                      ; preds = %89, %84
  tail call void @OutputStatus(i32 noundef 40975) #3
  tail call void @FsblFallback() #3
  br label %92

92:                                               ; preds = %.sink.split, %89
  %93 = load i8, ptr @PSPartitionFlag, align 1, !tbaa !5
  %94 = icmp eq i8 %93, 0
  %95 = icmp ne i8 %.078.ph128, 0
  %or.cond16 = select i1 %94, i1 true, i1 %95
  %spec.select = select i1 %or.cond16, i32 %.081.ph126, i32 %41
  %spec.select106 = select i1 %or.cond16, i8 %.078.ph128, i8 1
  %96 = load i8, ptr @PLPartitionFlag, align 1, !tbaa !5
  %.not94 = icmp eq i8 %96, 0
  br i1 %.not94, label %100, label %97

97:                                               ; preds = %92
  %98 = tail call i32 @FsblHookBeforeBitstreamDload() #3
  %.not95 = icmp eq i32 %98, 0
  br i1 %.not95, label %100, label %99

99:                                               ; preds = %97
  tail call void @OutputStatus(i32 noundef 41986) #3
  tail call void @FsblFallback() #3
  br label %100

100:                                              ; preds = %97, %99, %92
  %101 = tail call i32 @PartitionMove(i32 noundef %.0, ptr noundef nonnull %33)
  %.not96 = icmp eq i32 %101, 0
  br i1 %.not96, label %103, label %102

102:                                              ; preds = %100
  tail call void @OutputStatus(i32 noundef 40971) #3
  tail call void @FsblFallback() #3
  br label %103

103:                                              ; preds = %102, %100
  %104 = load i8, ptr @SignedPartitionFlag, align 1, !tbaa !5
  %105 = icmp ne i8 %104, 0
  %106 = load i8, ptr @PartitionChecksumFlag, align 1
  %107 = icmp ne i8 %106, 0
  %or.cond19 = select i1 %105, i1 true, i1 %107
  br i1 %or.cond19, label %108, label %139

108:                                              ; preds = %103
  %109 = load i8, ptr @PLPartitionFlag, align 1, !tbaa !5
  %.not97 = icmp eq i8 %109, 0
  %.107 = select i1 %.not97, i32 %45, i32 1048576
  %.not98 = icmp eq i8 %106, 0
  br i1 %.not98, label %116, label %110

110:                                              ; preds = %108
  %111 = shl i32 %49, 2
  %112 = shl i32 %47, 2
  %113 = add i32 %112, %.0
  %114 = tail call i32 @ValidateParition(i32 noundef %.107, i32 noundef %111, i32 noundef %113)
  %.not99 = icmp eq i32 %114, 0
  br i1 %.not99, label %116, label %115

115:                                              ; preds = %110
  tail call void @OutputStatus(i32 noundef 40976) #3
  tail call void @FsblFallback() #3
  br label %116

116:                                              ; preds = %110, %115, %108
  %117 = load i8, ptr @SignedPartitionFlag, align 1, !tbaa !5
  %118 = icmp eq i8 %117, 1
  br i1 %118, label %119, label %120

119:                                              ; preds = %116
  tail call void @OutputStatus(i32 noundef 40977) #3
  tail call void @FsblFallback() #3
  br label %120

120:                                              ; preds = %119, %116
  %121 = load i8, ptr @EncryptedPartitionFlag, align 1, !tbaa !5
  %122 = icmp ne i8 %121, 0
  %123 = load i8, ptr @PSPartitionFlag, align 1
  %124 = icmp ne i8 %123, 0
  %or.cond22 = select i1 %122, i1 %124, i1 false
  br i1 %or.cond22, label %125, label %128

125:                                              ; preds = %120
  %126 = tail call i32 @DecryptPartition(i32 noundef %.107, i32 noundef %38, i32 noundef %39)
  %.not100 = icmp eq i32 %126, 0
  br i1 %.not100, label %128, label %127

127:                                              ; preds = %125
  tail call void @OutputStatus(i32 noundef 40963) #3
  tail call void @FsblFallback() #3
  br label %128

128:                                              ; preds = %125, %127, %120
  %129 = load i8, ptr @PLPartitionFlag, align 1, !tbaa !5
  %.not101 = icmp eq i8 %129, 0
  br i1 %.not101, label %.thread109, label %130

130:                                              ; preds = %128
  %131 = zext i32 %.107 to i64
  %132 = inttoptr i64 %131 to ptr
  %133 = zext i32 %45 to i64
  %134 = inttoptr i64 %133 to ptr
  %135 = load i8, ptr @EncryptedPartitionFlag, align 1, !tbaa !5
  %136 = zext i8 %135 to i32
  %137 = tail call i32 @PcapLoadPartition(ptr noundef %132, ptr noundef %134, i32 noundef %39, i32 noundef %38, i32 noundef %136) #3
  %.not102 = icmp eq i32 %137, 0
  br i1 %.not102, label %139, label %138

138:                                              ; preds = %130
  tail call void @OutputStatus(i32 noundef 40964) #3
  tail call void @FsblFallback() #3
  br label %139

139:                                              ; preds = %138, %130, %103
  %.pr = load i8, ptr @PLPartitionFlag, align 1, !tbaa !5
  %.not103 = icmp eq i8 %.pr, 0
  br i1 %.not103, label %.thread109, label %140

140:                                              ; preds = %139
  %141 = tail call i32 @FsblHookAfterBitstreamDload() #3
  %.not104 = icmp eq i32 %141, 0
  br i1 %.not104, label %.thread109, label %142

142:                                              ; preds = %140
  tail call void @OutputStatus(i32 noundef 41987) #3
  tail call void @FsblFallback() #3
  br label %.thread109

.thread109:                                       ; preds = %128, %140, %142, %139
  %143 = add nuw i32 %56, 1
  %144 = load i32, ptr @PartitionCount, align 4, !tbaa !8
  %145 = icmp ult i32 %143, %144
  br i1 %145, label %.lr.ph, label %.loopexit, !llvm.loop !24

.loopexit:                                        ; preds = %.thread109, %84, %51, %28, %61
  %.081.ph122 = phi i32 [ %.081.ph126, %61 ], [ 0, %28 ], [ %.081.ph126, %51 ], [ %spec.select, %.thread109 ], [ %.081.ph126, %84 ]
  ret i32 %.081.ph122
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @Xil_In32(i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @Xil_Out32(i64 noundef, i32 noundef) local_unnamed_addr #1

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

declare void @OutputStatus(i32 noundef) local_unnamed_addr #2

declare void @FsblFallback() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @HeaderDump(ptr noundef) local_unnamed_addr #0

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

declare void @xil_printf(ptr noundef, ...) local_unnamed_addr #2

declare i32 @FsblHookBeforeBitstreamDload() local_unnamed_addr #2

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

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

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

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

declare i32 @FsblHookAfterBitstreamDload() local_unnamed_addr #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 = { inlinehint 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 = { "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, !9, i64 4}
!13 = !{!"", !14, i64 0, !9, i64 8, !9, i64 12, !11, i64 16, !11, i64 24}
!14 = !{!"", !15, i64 0, !9, i64 4}
!15 = !{!"short", !6, i64 0}
!16 = !{!17, !9, i64 4}
!17 = !{!"StructPartHeader", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !9, i64 32, !6, i64 36, !9, i64 40, !6, i64 44, !9, i64 60}
!18 = !{!17, !9, i64 0}
!19 = !{!17, !9, i64 16}
!20 = !{!17, !9, i64 24}
!21 = !{!17, !9, i64 12}
!22 = !{!17, !9, i64 32}
!23 = !{!17, !9, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


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