; LLVM IR from openssl/openssl :: crypto/slh_dsa (slh_fors)

; 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.wpacket_st = type { ptr, ptr, i64, i64, i64, ptr, i8 }
%struct.slh_dsa_hash_ctx_st = type { ptr, ptr, ptr, ptr, i32 }
%struct.slh_dsa_key_st = type { [128 x i8], ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.slh_dsa_params_st = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
%struct.slh_adrs_func_st = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.slh_hash_func_st = type { ptr, ptr, ptr, ptr, ptr, ptr }

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

; Function Attrs: nounwind uwtable
declare hidden void @slh_base_2b(ptr noundef, i32 noundef, ptr noundef, i64 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_slh_fors_pk_from_sig(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6) #1 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca [35 x i32], align 16
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca [10080 x i8], align 16
  %30 = alloca i64, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca %struct.wpacket_st, align 8
  %34 = alloca ptr, align 8
  %35 = alloca [32 x i8], align 16
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i64 %6, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.slh_dsa_hash_ctx_st, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !11
  store ptr %47, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 140, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %48 = load ptr, ptr %16, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.slh_dsa_key_st, ptr %48, i32 0, i32 5
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  store ptr %50, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %51 = load ptr, ptr %22, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.slh_dsa_params_st, ptr %51, i32 0, i32 7
  %53 = load i32, ptr %52, align 8, !tbaa !17
  store i32 %53, ptr %23, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %54 = load ptr, ptr %22, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.slh_dsa_params_st, ptr %54, i32 0, i32 8
  %56 = load i32, ptr %55, align 4, !tbaa !19
  store i32 %56, ptr %24, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  %57 = load ptr, ptr %22, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.slh_dsa_params_st, ptr %57, i32 0, i32 3
  %59 = load i32, ptr %58, align 8, !tbaa !20
  store i32 %59, ptr %25, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %60 = load i32, ptr %23, align 4, !tbaa !14
  %61 = shl i32 1, %60
  store i32 %61, ptr %26, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 10080, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  store i64 0, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr %33) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  store ptr %33, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %62 = load ptr, ptr %16, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.slh_dsa_key_st, ptr %62, i32 0, i32 6
  %64 = load ptr, ptr %63, align 8, !tbaa !21
  store ptr %64, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  %65 = load ptr, ptr %36, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %65, i32 0, i32 8
  %67 = load ptr, ptr %66, align 8, !tbaa !22
  store ptr %67, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  %68 = load ptr, ptr %36, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %68, i32 0, i32 6
  %70 = load ptr, ptr %69, align 8, !tbaa !24
  store ptr %70, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #4
  %71 = load ptr, ptr %16, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.slh_dsa_key_st, ptr %71, i32 0, i32 7
  %73 = load ptr, ptr %72, align 8, !tbaa !25
  store ptr %73, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #4
  %74 = load ptr, ptr %39, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.slh_hash_func_st, ptr %74, i32 0, i32 3
  %76 = load ptr, ptr %75, align 8, !tbaa !26
  store ptr %76, ptr %40, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #4
  %77 = load ptr, ptr %39, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.slh_hash_func_st, ptr %77, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !28
  store ptr %79, ptr %41, align 8, !tbaa !5
  %80 = load ptr, ptr %34, align 8, !tbaa !5
  %81 = getelementptr inbounds [10080 x i8], ptr %29, i64 0, i64 0
  %82 = call i32 @WPACKET_init_static_len(ptr noundef %80, ptr noundef %81, i64 noundef 10080, i64 noundef 0)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %85, label %84

84:                                               ; preds = %7
  store i32 0, ptr %8, align 4
  store i32 1, ptr %42, align 4
  br label %247

85:                                               ; preds = %7
  %86 = load ptr, ptr %11, align 8, !tbaa !5
  %87 = load i32, ptr %23, align 4, !tbaa !14
  %88 = getelementptr inbounds [35 x i32], ptr %21, i64 0, i64 0
  %89 = load i32, ptr %24, align 4, !tbaa !14
  %90 = zext i32 %89 to i64
  call void @slh_base_2b(ptr noundef %86, i32 noundef %87, ptr noundef %88, i64 noundef %90)
  store i32 0, ptr %18, align 4, !tbaa !14
  br label %91

91:                                               ; preds = %206, %85
  %92 = load i32, ptr %18, align 4, !tbaa !14
  %93 = load i32, ptr %24, align 4, !tbaa !14
  %94 = icmp ult i32 %92, %93
  br i1 %94, label %95, label %209

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #4
  %96 = load i32, ptr %18, align 4, !tbaa !14
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds [35 x i32], ptr %21, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !14
  store i32 %99, ptr %43, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #4
  %100 = load i32, ptr %43, align 4, !tbaa !14
  %101 = load i32, ptr %20, align 4, !tbaa !14
  %102 = add i32 %100, %101
  store i32 %102, ptr %44, align 4, !tbaa !14
  %103 = load ptr, ptr %38, align 8, !tbaa !5
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  call void %103(ptr noundef %104, i32 noundef 0)
  %105 = load ptr, ptr %37, align 8, !tbaa !5
  %106 = load ptr, ptr %13, align 8, !tbaa !5
  %107 = load i32, ptr %44, align 4, !tbaa !14
  call void %105(ptr noundef %106, i32 noundef %107)
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = load i32, ptr %25, align 4, !tbaa !14
  %110 = zext i32 %109 to i64
  %111 = call i32 @PACKET_get_bytes(ptr noundef %108, ptr noundef %27, i64 noundef %110)
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %132

113:                                              ; preds = %95
  %114 = load ptr, ptr %34, align 8, !tbaa !5
  %115 = load i32, ptr %25, align 4, !tbaa !14
  %116 = zext i32 %115 to i64
  %117 = call i32 @WPACKET_allocate_bytes(ptr noundef %114, i64 noundef %116, ptr noundef %31)
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %132

119:                                              ; preds = %113
  %120 = load ptr, ptr %40, align 8, !tbaa !5
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = load ptr, ptr %13, align 8, !tbaa !5
  %124 = load ptr, ptr %27, align 8, !tbaa !5
  %125 = load i32, ptr %25, align 4, !tbaa !14
  %126 = zext i32 %125 to i64
  %127 = load ptr, ptr %31, align 8, !tbaa !5
  %128 = load i32, ptr %25, align 4, !tbaa !14
  %129 = zext i32 %128 to i64
  %130 = call i32 %120(ptr noundef %121, ptr noundef %122, ptr noundef %123, ptr noundef %124, i64 noundef %126, ptr noundef %127, i64 noundef %129)
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %133, label %132

132:                                              ; preds = %119, %113, %95
  store i32 5, ptr %42, align 4
  br label %203

133:                                              ; preds = %119
  %134 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %134, ptr %32, align 8, !tbaa !5
  store i32 0, ptr %19, align 4, !tbaa !14
  br label %135

135:                                              ; preds = %196, %133
  %136 = load i32, ptr %19, align 4, !tbaa !14
  %137 = load i32, ptr %23, align 4, !tbaa !14
  %138 = icmp ult i32 %136, %137
  br i1 %138, label %139, label %199

139:                                              ; preds = %135
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load i32, ptr %25, align 4, !tbaa !14
  %142 = zext i32 %141 to i64
  %143 = call i32 @PACKET_get_bytes(ptr noundef %140, ptr noundef %28, i64 noundef %142)
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %146, label %145

145:                                              ; preds = %139
  store i32 5, ptr %42, align 4
  br label %203

146:                                              ; preds = %139
  %147 = load ptr, ptr %38, align 8, !tbaa !5
  %148 = load ptr, ptr %13, align 8, !tbaa !5
  %149 = load i32, ptr %19, align 4, !tbaa !14
  %150 = add i32 %149, 1
  call void %147(ptr noundef %148, i32 noundef %150)
  %151 = load i32, ptr %43, align 4, !tbaa !14
  %152 = and i32 %151, 1
  %153 = icmp eq i32 %152, 0
  br i1 %153, label %154, label %173

154:                                              ; preds = %146
  %155 = load i32, ptr %44, align 4, !tbaa !14
  %156 = lshr i32 %155, 1
  store i32 %156, ptr %44, align 4, !tbaa !14
  %157 = load ptr, ptr %37, align 8, !tbaa !5
  %158 = load ptr, ptr %13, align 8, !tbaa !5
  %159 = load i32, ptr %44, align 4, !tbaa !14
  call void %157(ptr noundef %158, i32 noundef %159)
  %160 = load ptr, ptr %41, align 8, !tbaa !5
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  %163 = load ptr, ptr %13, align 8, !tbaa !5
  %164 = load ptr, ptr %31, align 8, !tbaa !5
  %165 = load ptr, ptr %28, align 8, !tbaa !5
  %166 = load ptr, ptr %32, align 8, !tbaa !5
  %167 = load i32, ptr %25, align 4, !tbaa !14
  %168 = zext i32 %167 to i64
  %169 = call i32 %160(ptr noundef %161, ptr noundef %162, ptr noundef %163, ptr noundef %164, ptr noundef %165, ptr noundef %166, i64 noundef %168)
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %172, label %171

171:                                              ; preds = %154
  store i32 5, ptr %42, align 4
  br label %203

172:                                              ; preds = %154
  br label %193

173:                                              ; preds = %146
  %174 = load i32, ptr %44, align 4, !tbaa !14
  %175 = sub i32 %174, 1
  %176 = lshr i32 %175, 1
  store i32 %176, ptr %44, align 4, !tbaa !14
  %177 = load ptr, ptr %37, align 8, !tbaa !5
  %178 = load ptr, ptr %13, align 8, !tbaa !5
  %179 = load i32, ptr %44, align 4, !tbaa !14
  call void %177(ptr noundef %178, i32 noundef %179)
  %180 = load ptr, ptr %41, align 8, !tbaa !5
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = load ptr, ptr %13, align 8, !tbaa !5
  %184 = load ptr, ptr %28, align 8, !tbaa !5
  %185 = load ptr, ptr %31, align 8, !tbaa !5
  %186 = load ptr, ptr %32, align 8, !tbaa !5
  %187 = load i32, ptr %25, align 4, !tbaa !14
  %188 = zext i32 %187 to i64
  %189 = call i32 %180(ptr noundef %181, ptr noundef %182, ptr noundef %183, ptr noundef %184, ptr noundef %185, ptr noundef %186, i64 noundef %188)
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %192, label %191

191:                                              ; preds = %173
  store i32 5, ptr %42, align 4
  br label %203

192:                                              ; preds = %173
  br label %193

193:                                              ; preds = %192, %172
  %194 = load i32, ptr %43, align 4, !tbaa !14
  %195 = lshr i32 %194, 1
  store i32 %195, ptr %43, align 4, !tbaa !14
  br label %196

196:                                              ; preds = %193
  %197 = load i32, ptr %19, align 4, !tbaa !14
  %198 = add i32 %197, 1
  store i32 %198, ptr %19, align 4, !tbaa !14
  br label %135, !llvm.loop !29

199:                                              ; preds = %135
  %200 = load i32, ptr %26, align 4, !tbaa !14
  %201 = load i32, ptr %20, align 4, !tbaa !14
  %202 = add i32 %201, %200
  store i32 %202, ptr %20, align 4, !tbaa !14
  store i32 0, ptr %42, align 4
  br label %203

203:                                              ; preds = %199, %191, %171, %145, %132
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #4
  %204 = load i32, ptr %42, align 4
  switch i32 %204, label %247 [
    i32 0, label %205
    i32 5, label %240
  ]

205:                                              ; preds = %203
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %18, align 4, !tbaa !14
  %208 = add i32 %207, 1
  store i32 %208, ptr %18, align 4, !tbaa !14
  br label %91, !llvm.loop !31

209:                                              ; preds = %91
  %210 = load ptr, ptr %34, align 8, !tbaa !5
  %211 = call i32 @WPACKET_get_total_written(ptr noundef %210, ptr noundef %30)
  %212 = icmp ne i32 %211, 0
  br i1 %212, label %214, label %213

213:                                              ; preds = %209
  br label %240

214:                                              ; preds = %209
  %215 = load ptr, ptr %36, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %215, i32 0, i32 10
  %217 = load ptr, ptr %216, align 8, !tbaa !32
  %218 = getelementptr inbounds [32 x i8], ptr %35, i64 0, i64 0
  %219 = load ptr, ptr %13, align 8, !tbaa !5
  call void %217(ptr noundef %218, ptr noundef %219)
  %220 = load ptr, ptr %36, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %220, i32 0, i32 2
  %222 = load ptr, ptr %221, align 8, !tbaa !33
  %223 = getelementptr inbounds [32 x i8], ptr %35, i64 0, i64 0
  call void %222(ptr noundef %223, i32 noundef 4)
  %224 = load ptr, ptr %36, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %224, i32 0, i32 4
  %226 = load ptr, ptr %225, align 8, !tbaa !34
  %227 = getelementptr inbounds [32 x i8], ptr %35, i64 0, i64 0
  %228 = load ptr, ptr %13, align 8, !tbaa !5
  call void %226(ptr noundef %227, ptr noundef %228)
  %229 = load ptr, ptr %39, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.slh_hash_func_st, ptr %229, i32 0, i32 5
  %231 = load ptr, ptr %230, align 8, !tbaa !35
  %232 = load ptr, ptr %9, align 8, !tbaa !5
  %233 = load ptr, ptr %12, align 8, !tbaa !5
  %234 = getelementptr inbounds [32 x i8], ptr %35, i64 0, i64 0
  %235 = getelementptr inbounds [10080 x i8], ptr %29, i64 0, i64 0
  %236 = load i64, ptr %30, align 8, !tbaa !9
  %237 = load ptr, ptr %14, align 8, !tbaa !5
  %238 = load i64, ptr %15, align 8, !tbaa !9
  %239 = call i32 %231(ptr noundef %232, ptr noundef %233, ptr noundef %234, ptr noundef %235, i64 noundef %236, ptr noundef %237, i64 noundef %238)
  store i32 %239, ptr %17, align 4, !tbaa !14
  br label %240

240:                                              ; preds = %214, %213, %203
  %241 = load ptr, ptr %34, align 8, !tbaa !5
  %242 = call i32 @WPACKET_finish(ptr noundef %241)
  %243 = icmp ne i32 %242, 0
  br i1 %243, label %245, label %244

244:                                              ; preds = %240
  store i32 0, ptr %17, align 4, !tbaa !14
  br label %245

245:                                              ; preds = %244, %240
  %246 = load i32, ptr %17, align 4, !tbaa !14
  store i32 %246, ptr %8, align 4
  store i32 1, ptr %42, align 4
  br label %247

247:                                              ; preds = %245, %203, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 10080, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 140, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  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
  %248 = load i32, ptr %8, align 4
  ret i32 %248
}

declare i32 @WPACKET_init_static_len(ptr noundef, ptr noundef, i64 noundef, i64 noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @PACKET_get_bytes(ptr noundef, ptr noundef, i64 noundef) #3

declare i32 @WPACKET_allocate_bytes(ptr noundef, i64 noundef, ptr noundef) #2

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

declare i32 @WPACKET_finish(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"slh_dsa_hash_ctx_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !13, i64 32}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !6, i64 160}
!16 = !{!"slh_dsa_key_st", !7, i64 0, !6, i64 128, !6, i64 136, !6, i64 144, !13, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200}
!17 = !{!18, !13, i64 32}
!18 = !{!"slh_dsa_params_st", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !10, i64 56}
!19 = !{!18, !13, i64 36}
!20 = !{!18, !13, i64 16}
!21 = !{!16, !6, i64 168}
!22 = !{!23, !6, i64 64}
!23 = !{!"slh_adrs_func_st", !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}
!24 = !{!23, !6, i64 48}
!25 = !{!16, !6, i64 176}
!26 = !{!27, !6, i64 24}
!27 = !{!"slh_hash_func_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!28 = !{!27, !6, i64 32}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!23, !6, i64 80}
!33 = !{!23, !6, i64 16}
!34 = !{!23, !6, i64 32}
!35 = !{!27, !6, i64 40}


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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_slh_fors_pk_from_sig(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i64 noundef %6) local_unnamed_addr #1 {
  %8 = alloca [35 x i32], align 16
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [10080 x i8], align 16
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.wpacket_st, align 8
  %15 = alloca [32 x i8], align 16
  %16 = load ptr, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 140, ptr nonnull %8) #4
  %17 = getelementptr inbounds i8, ptr %16, i64 160
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %18, i64 32
  %20 = load i32, ptr %19, align 8, !tbaa !13
  %.fr112 = freeze i32 %20
  %21 = getelementptr inbounds i8, ptr %18, i64 36
  %22 = load i32, ptr %21, align 4, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %18, i64 16
  %24 = load i32, ptr %23, align 8, !tbaa !17
  %25 = shl nuw i32 1, %.fr112
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 10080, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  store i64 0, ptr %12, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #4
  %26 = getelementptr inbounds i8, ptr %16, i64 168
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %27, i64 64
  %29 = load ptr, ptr %28, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %27, i64 48
  %31 = load ptr, ptr %30, align 8, !tbaa !22
  %32 = getelementptr inbounds i8, ptr %16, i64 176
  %33 = load ptr, ptr %32, align 8, !tbaa !23
  %34 = getelementptr inbounds i8, ptr %33, i64 24
  %35 = load ptr, ptr %34, align 8, !tbaa !24
  %36 = getelementptr inbounds i8, ptr %33, i64 32
  %37 = load ptr, ptr %36, align 8, !tbaa !26
  %38 = call i32 @WPACKET_init_static_len(ptr noundef nonnull %14, ptr noundef nonnull %11, i64 noundef 10080, i64 noundef 0) #4
  %.not = icmp eq i32 %38, 0
  br i1 %.not, label %98, label %39

39:                                               ; preds = %7
  %40 = zext i32 %22 to i64
  call void @slh_base_2b(ptr noundef %2, i32 noundef %.fr112, ptr noundef nonnull %8, i64 noundef %40)
  %.not111 = icmp eq i32 %22, 0
  br i1 %.not111, label %._crit_edge110, label %.lr.ph109

.lr.ph109:                                        ; preds = %39
  %41 = zext i32 %24 to i64
  %.not113 = icmp eq i32 %.fr112, 0
  br i1 %.not113, label %.lr.ph109.split, label %.lr.ph109.split.us

.lr.ph109.split.us:                               ; preds = %.lr.ph109, %._crit_edge.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %._crit_edge.us ], [ 0, %.lr.ph109 ]
  %.090106.us = phi i32 [ %72, %._crit_edge.us ], [ 0, %.lr.ph109 ]
  %42 = getelementptr inbounds [35 x i32], ptr %8, i64 0, i64 %indvars.iv
  %43 = load i32, ptr %42, align 4, !tbaa !27
  %44 = add i32 %43, %.090106.us
  call void %31(ptr noundef %4, i32 noundef 0) #4
  call void %29(ptr noundef %4, i32 noundef %44) #4
  %45 = call i32 @PACKET_get_bytes(ptr noundef %1, ptr noundef nonnull %9, i64 noundef %41)
  %.not93.us = icmp eq i32 %45, 0
  br i1 %.not93.us, label %.thread, label %46

46:                                               ; preds = %.lr.ph109.split.us
  %47 = call i32 @WPACKET_allocate_bytes(ptr noundef nonnull %14, i64 noundef %41, ptr noundef nonnull %13) #4
  %.not94.us = icmp eq i32 %47, 0
  br i1 %.not94.us, label %.thread, label %48

48:                                               ; preds = %46
  %49 = load ptr, ptr %9, align 8, !tbaa !28
  %50 = load ptr, ptr %13, align 8, !tbaa !28
  %51 = call i32 %35(ptr noundef nonnull %0, ptr noundef %3, ptr noundef %4, ptr noundef %49, i64 noundef %41, ptr noundef %50, i64 noundef %41) #4
  %.not95.us = icmp eq i32 %51, 0
  br i1 %.not95.us, label %.thread, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %48
  %52 = load ptr, ptr %13, align 8, !tbaa !28
  br label %53

53:                                               ; preds = %.lr.ph.us, %70
  %.0105.us = phi i32 [ %44, %.lr.ph.us ], [ %.1.us, %70 ]
  %.083104.us = phi i32 [ %43, %.lr.ph.us ], [ %71, %70 ]
  %.089103.us = phi i32 [ 0, %.lr.ph.us ], [ %56, %70 ]
  %54 = call i32 @PACKET_get_bytes(ptr noundef %1, ptr noundef nonnull %10, i64 noundef %41)
  %.not96.us = icmp eq i32 %54, 0
  br i1 %.not96.us, label %.thread, label %55

55:                                               ; preds = %53
  %56 = add nuw i32 %.089103.us, 1
  call void %31(ptr noundef %4, i32 noundef %56) #4
  %57 = and i32 %.083104.us, 1
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %65, label %59

59:                                               ; preds = %55
  %60 = add i32 %.0105.us, -1
  %61 = lshr i32 %60, 1
  call void %29(ptr noundef %4, i32 noundef %61) #4
  %62 = load ptr, ptr %10, align 8, !tbaa !28
  %63 = load ptr, ptr %13, align 8, !tbaa !28
  %64 = call i32 %37(ptr noundef nonnull %0, ptr noundef %3, ptr noundef %4, ptr noundef %62, ptr noundef %63, ptr noundef %52, i64 noundef %41) #4
  %.not97.us = icmp eq i32 %64, 0
  br i1 %.not97.us, label %.thread, label %70

65:                                               ; preds = %55
  %66 = lshr i32 %.0105.us, 1
  call void %29(ptr noundef %4, i32 noundef %66) #4
  %67 = load ptr, ptr %13, align 8, !tbaa !28
  %68 = load ptr, ptr %10, align 8, !tbaa !28
  %69 = call i32 %37(ptr noundef nonnull %0, ptr noundef %3, ptr noundef %4, ptr noundef %67, ptr noundef %68, ptr noundef %52, i64 noundef %41) #4
  %.not98.us = icmp eq i32 %69, 0
  br i1 %.not98.us, label %.thread, label %70

70:                                               ; preds = %65, %59
  %.1.us = phi i32 [ %66, %65 ], [ %61, %59 ]
  %71 = lshr i32 %.083104.us, 1
  %exitcond.not = icmp eq i32 %56, %.fr112
  br i1 %exitcond.not, label %._crit_edge.us, label %53, !llvm.loop !29

._crit_edge.us:                                   ; preds = %70
  %72 = add i32 %.090106.us, %25
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond118.not = icmp eq i64 %indvars.iv.next, %40
  br i1 %exitcond118.not, label %._crit_edge110, label %.lr.ph109.split.us, !llvm.loop !31

.lr.ph109.split:                                  ; preds = %.lr.ph109, %83
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %83 ], [ 0, %.lr.ph109 ]
  %.090106 = phi i32 [ %84, %83 ], [ 0, %.lr.ph109 ]
  %73 = getelementptr inbounds [35 x i32], ptr %8, i64 0, i64 %indvars.iv119
  %74 = load i32, ptr %73, align 4, !tbaa !27
  %75 = add i32 %74, %.090106
  call void %31(ptr noundef %4, i32 noundef 0) #4
  call void %29(ptr noundef %4, i32 noundef %75) #4
  %76 = call i32 @PACKET_get_bytes(ptr noundef %1, ptr noundef nonnull %9, i64 noundef %41)
  %.not93 = icmp eq i32 %76, 0
  br i1 %.not93, label %.thread, label %77

77:                                               ; preds = %.lr.ph109.split
  %78 = call i32 @WPACKET_allocate_bytes(ptr noundef nonnull %14, i64 noundef %41, ptr noundef nonnull %13) #4
  %.not94 = icmp eq i32 %78, 0
  br i1 %.not94, label %.thread, label %79

79:                                               ; preds = %77
  %80 = load ptr, ptr %9, align 8, !tbaa !28
  %81 = load ptr, ptr %13, align 8, !tbaa !28
  %82 = call i32 %35(ptr noundef nonnull %0, ptr noundef %3, ptr noundef %4, ptr noundef %80, i64 noundef %41, ptr noundef %81, i64 noundef %41) #4
  %.not95 = icmp eq i32 %82, 0
  br i1 %.not95, label %.thread, label %83

83:                                               ; preds = %79
  %84 = add i32 %.090106, %25
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %exitcond123.not = icmp eq i64 %indvars.iv.next120, %40
  br i1 %exitcond123.not, label %._crit_edge110, label %.lr.ph109.split, !llvm.loop !31

._crit_edge110:                                   ; preds = %._crit_edge.us, %83, %39
  %85 = call i32 @WPACKET_get_total_written(ptr noundef nonnull %14, ptr noundef nonnull %12) #4
  %.not92 = icmp eq i32 %85, 0
  br i1 %.not92, label %.thread, label %86

86:                                               ; preds = %._crit_edge110
  %87 = getelementptr inbounds i8, ptr %27, i64 80
  %88 = load ptr, ptr %87, align 8, !tbaa !32
  call void %88(ptr noundef nonnull %15, ptr noundef %4) #4
  %89 = getelementptr inbounds i8, ptr %27, i64 16
  %90 = load ptr, ptr %89, align 8, !tbaa !33
  call void %90(ptr noundef nonnull %15, i32 noundef 4) #4
  %91 = getelementptr inbounds i8, ptr %27, i64 32
  %92 = load ptr, ptr %91, align 8, !tbaa !34
  call void %92(ptr noundef nonnull %15, ptr noundef %4) #4
  %93 = getelementptr inbounds i8, ptr %33, i64 40
  %94 = load ptr, ptr %93, align 8, !tbaa !35
  %95 = load i64, ptr %12, align 8, !tbaa !18
  %96 = call i32 %94(ptr noundef nonnull %0, ptr noundef %3, ptr noundef nonnull %15, ptr noundef nonnull %11, i64 noundef %95, ptr noundef %5, i64 noundef %6) #4
  br label %.thread

.thread:                                          ; preds = %48, %46, %.lr.ph109.split.us, %65, %59, %53, %79, %77, %.lr.ph109.split, %._crit_edge110, %86
  %.086 = phi i32 [ %96, %86 ], [ 0, %._crit_edge110 ], [ 0, %.lr.ph109.split ], [ 0, %77 ], [ 0, %79 ], [ 0, %53 ], [ 0, %59 ], [ 0, %65 ], [ 0, %.lr.ph109.split.us ], [ 0, %46 ], [ 0, %48 ]
  %97 = call i32 @WPACKET_finish(ptr noundef nonnull %14) #4
  %.not99 = icmp eq i32 %97, 0
  %spec.select = select i1 %.not99, i32 0, i32 %.086
  br label %98

98:                                               ; preds = %7, %.thread
  %.085 = phi i32 [ %spec.select, %.thread ], [ 0, %7 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 10080, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 140, ptr nonnull %8) #4
  ret i32 %.085
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @PACKET_get_bytes(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

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

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

declare i32 @WPACKET_finish(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #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, !7, i64 0}
!6 = !{!"slh_dsa_hash_ctx_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 160}
!12 = !{!"slh_dsa_key_st", !8, i64 0, !7, i64 128, !7, i64 136, !7, i64 144, !10, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200}
!13 = !{!14, !10, i64 32}
!14 = !{!"slh_dsa_params_st", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !15, i64 56}
!15 = !{!"long", !8, i64 0}
!16 = !{!14, !10, i64 36}
!17 = !{!14, !10, i64 16}
!18 = !{!15, !15, i64 0}
!19 = !{!12, !7, i64 168}
!20 = !{!21, !7, i64 64}
!21 = !{!"slh_adrs_func_st", !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}
!22 = !{!21, !7, i64 48}
!23 = !{!12, !7, i64 176}
!24 = !{!25, !7, i64 24}
!25 = !{!"slh_hash_func_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!26 = !{!25, !7, i64 32}
!27 = !{!10, !10, i64 0}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = !{!21, !7, i64 80}
!33 = !{!21, !7, i64 16}
!34 = !{!21, !7, i64 32}
!35 = !{!25, !7, i64 40}


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