; LLVM IR from tfhe/spqlios-arithmetic :: spqlios/arithmetic (vector_matrix_product)

; 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_info_t = type { i32, i64, i64, %union.backend_module_info_t, %struct.module_virtual_functions_t }
%union.backend_module_info_t = type { %struct.fft64_module_info_t }
%struct.fft64_module_info_t = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.module_virtual_functions_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, 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: 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 void @fft64_vmp_apply_dft_to_dft_ref(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, ptr noundef %8) #1 {
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i64, align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i64, align 8
  %35 = alloca i64, align 8
  %36 = alloca ptr, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store ptr %1, ptr %11, align 8, !tbaa !5
  store i64 %2, ptr %12, align 8, !tbaa !9
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i64 %4, ptr %14, align 8, !tbaa !9
  store ptr %5, ptr %15, align 8, !tbaa !5
  store i64 %6, ptr %16, align 8, !tbaa !9
  store i64 %7, ptr %17, align 8, !tbaa !9
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.module_info_t, ptr %39, i32 0, i32 2
  %41 = load i64, ptr %40, align 8, !tbaa !11
  store i64 %41, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.module_info_t, ptr %42, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !15
  store i64 %44, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %45 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %45, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  %46 = load ptr, ptr %18, align 8, !tbaa !5
  %47 = getelementptr inbounds double, ptr %46, i64 16
  store ptr %47, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %48, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %49, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %50, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %51 = load i64, ptr %16, align 8, !tbaa !9
  %52 = load i64, ptr %14, align 8, !tbaa !9
  %53 = icmp ult i64 %51, %52
  br i1 %53, label %54, label %56

54:                                               ; preds = %9
  %55 = load i64, ptr %16, align 8, !tbaa !9
  br label %58

56:                                               ; preds = %9
  %57 = load i64, ptr %14, align 8, !tbaa !9
  br label %58

58:                                               ; preds = %56, %54
  %59 = phi i64 [ %55, %54 ], [ %57, %56 ]
  store i64 %59, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  %60 = load i64, ptr %17, align 8, !tbaa !9
  %61 = load i64, ptr %12, align 8, !tbaa !9
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %58
  %64 = load i64, ptr %17, align 8, !tbaa !9
  br label %67

65:                                               ; preds = %58
  %66 = load i64, ptr %12, align 8, !tbaa !9
  br label %67

67:                                               ; preds = %65, %63
  %68 = phi i64 [ %64, %63 ], [ %66, %65 ]
  store i64 %68, ptr %27, align 8, !tbaa !9
  %69 = load i64, ptr %20, align 8, !tbaa !9
  %70 = icmp uge i64 %69, 8
  br i1 %70, label %71, label %172

71:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  store i64 0, ptr %28, align 8, !tbaa !9
  br label %72

72:                                               ; preds = %168, %71
  %73 = load i64, ptr %28, align 8, !tbaa !9
  %74 = load i64, ptr %19, align 8, !tbaa !9
  %75 = udiv i64 %74, 4
  %76 = icmp ult i64 %73, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %72
  store i32 2, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  br label %171

78:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #4
  %79 = load ptr, ptr %23, align 8, !tbaa !5
  %80 = load i64, ptr %28, align 8, !tbaa !9
  %81 = load i64, ptr %16, align 8, !tbaa !9
  %82 = mul i64 8, %81
  %83 = load i64, ptr %17, align 8, !tbaa !9
  %84 = mul i64 %82, %83
  %85 = mul i64 %80, %84
  %86 = getelementptr inbounds double, ptr %79, i64 %85
  store ptr %86, ptr %30, align 8, !tbaa !5
  %87 = load i64, ptr %19, align 8, !tbaa !9
  %88 = load i64, ptr %26, align 8, !tbaa !9
  %89 = load i64, ptr %28, align 8, !tbaa !9
  %90 = load ptr, ptr %22, align 8, !tbaa !5
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  call void @reim4_extract_1blk_from_contiguous_reim_ref(i64 noundef %87, i64 noundef %88, i64 noundef %89, ptr noundef %90, ptr noundef %91)
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #4
  store i64 0, ptr %31, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %127, %78
  %93 = load i64, ptr %31, align 8, !tbaa !9
  %94 = load i64, ptr %27, align 8, !tbaa !9
  %95 = sub i64 %94, 1
  %96 = icmp ult i64 %93, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  store i32 5, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #4
  br label %130

98:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #4
  %99 = load i64, ptr %31, align 8, !tbaa !9
  %100 = load i64, ptr %16, align 8, !tbaa !9
  %101 = mul i64 8, %100
  %102 = mul i64 %99, %101
  store i64 %102, ptr %32, align 8, !tbaa !9
  %103 = load i64, ptr %26, align 8, !tbaa !9
  %104 = load ptr, ptr %21, align 8, !tbaa !5
  %105 = load ptr, ptr %22, align 8, !tbaa !5
  %106 = load ptr, ptr %30, align 8, !tbaa !5
  %107 = load i64, ptr %32, align 8, !tbaa !9
  %108 = getelementptr inbounds double, ptr %106, i64 %107
  call void @reim4_vec_mat2cols_product_ref(i64 noundef %103, ptr noundef %104, ptr noundef %105, ptr noundef %108)
  %109 = load i64, ptr %19, align 8, !tbaa !9
  %110 = load i64, ptr %28, align 8, !tbaa !9
  %111 = load ptr, ptr %25, align 8, !tbaa !5
  %112 = load i64, ptr %31, align 8, !tbaa !9
  %113 = load i64, ptr %20, align 8, !tbaa !9
  %114 = mul i64 %112, %113
  %115 = getelementptr inbounds double, ptr %111, i64 %114
  %116 = load ptr, ptr %21, align 8, !tbaa !5
  call void @reim4_save_1blk_to_reim_ref(i64 noundef %109, i64 noundef %110, ptr noundef %115, ptr noundef %116)
  %117 = load i64, ptr %19, align 8, !tbaa !9
  %118 = load i64, ptr %28, align 8, !tbaa !9
  %119 = load ptr, ptr %25, align 8, !tbaa !5
  %120 = load i64, ptr %31, align 8, !tbaa !9
  %121 = add i64 %120, 1
  %122 = load i64, ptr %20, align 8, !tbaa !9
  %123 = mul i64 %121, %122
  %124 = getelementptr inbounds double, ptr %119, i64 %123
  %125 = load ptr, ptr %21, align 8, !tbaa !5
  %126 = getelementptr inbounds double, ptr %125, i64 8
  call void @reim4_save_1blk_to_reim_ref(i64 noundef %117, i64 noundef %118, ptr noundef %124, ptr noundef %126)
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #4
  br label %127

127:                                              ; preds = %98
  %128 = load i64, ptr %31, align 8, !tbaa !9
  %129 = add i64 %128, 2
  store i64 %129, ptr %31, align 8, !tbaa !9
  br label %92, !llvm.loop !16

130:                                              ; preds = %97
  %131 = load i64, ptr %27, align 8, !tbaa !9
  %132 = urem i64 %131, 2
  %133 = icmp eq i64 %132, 1
  br i1 %133, label %134, label %167

134:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #4
  %135 = load i64, ptr %27, align 8, !tbaa !9
  %136 = sub i64 %135, 1
  store i64 %136, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #4
  %137 = load i64, ptr %33, align 8, !tbaa !9
  %138 = load i64, ptr %16, align 8, !tbaa !9
  %139 = mul i64 8, %138
  %140 = mul i64 %137, %139
  store i64 %140, ptr %34, align 8, !tbaa !9
  %141 = load i64, ptr %17, align 8, !tbaa !9
  %142 = load i64, ptr %27, align 8, !tbaa !9
  %143 = icmp eq i64 %141, %142
  br i1 %143, label %144, label %151

144:                                              ; preds = %134
  %145 = load i64, ptr %26, align 8, !tbaa !9
  %146 = load ptr, ptr %21, align 8, !tbaa !5
  %147 = load ptr, ptr %22, align 8, !tbaa !5
  %148 = load ptr, ptr %30, align 8, !tbaa !5
  %149 = load i64, ptr %34, align 8, !tbaa !9
  %150 = getelementptr inbounds double, ptr %148, i64 %149
  call void @reim4_vec_mat1col_product_ref(i64 noundef %145, ptr noundef %146, ptr noundef %147, ptr noundef %150)
  br label %158

151:                                              ; preds = %134
  %152 = load i64, ptr %26, align 8, !tbaa !9
  %153 = load ptr, ptr %21, align 8, !tbaa !5
  %154 = load ptr, ptr %22, align 8, !tbaa !5
  %155 = load ptr, ptr %30, align 8, !tbaa !5
  %156 = load i64, ptr %34, align 8, !tbaa !9
  %157 = getelementptr inbounds double, ptr %155, i64 %156
  call void @reim4_vec_mat2cols_product_ref(i64 noundef %152, ptr noundef %153, ptr noundef %154, ptr noundef %157)
  br label %158

158:                                              ; preds = %151, %144
  %159 = load i64, ptr %19, align 8, !tbaa !9
  %160 = load i64, ptr %28, align 8, !tbaa !9
  %161 = load ptr, ptr %25, align 8, !tbaa !5
  %162 = load i64, ptr %33, align 8, !tbaa !9
  %163 = load i64, ptr %20, align 8, !tbaa !9
  %164 = mul i64 %162, %163
  %165 = getelementptr inbounds double, ptr %161, i64 %164
  %166 = load ptr, ptr %21, align 8, !tbaa !5
  call void @reim4_save_1blk_to_reim_ref(i64 noundef %159, i64 noundef %160, ptr noundef %165, ptr noundef %166)
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  br label %167

167:                                              ; preds = %158, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  br label %168

168:                                              ; preds = %167
  %169 = load i64, ptr %28, align 8, !tbaa !9
  %170 = add i64 %169, 1
  store i64 %170, ptr %28, align 8, !tbaa !9
  br label %72, !llvm.loop !18

171:                                              ; preds = %77
  br label %247

172:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #4
  store i64 0, ptr %35, align 8, !tbaa !9
  br label %173

173:                                              ; preds = %243, %172
  %174 = load i64, ptr %35, align 8, !tbaa !9
  %175 = load i64, ptr %27, align 8, !tbaa !9
  %176 = icmp ult i64 %174, %175
  br i1 %176, label %178, label %177

177:                                              ; preds = %173
  store i32 8, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #4
  br label %246

178:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #4
  %179 = load ptr, ptr %23, align 8, !tbaa !5
  %180 = load i64, ptr %35, align 8, !tbaa !9
  %181 = load i64, ptr %16, align 8, !tbaa !9
  %182 = mul i64 %180, %181
  %183 = load i64, ptr %20, align 8, !tbaa !9
  %184 = mul i64 %182, %183
  %185 = getelementptr inbounds double, ptr %179, i64 %184
  store ptr %185, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #4
  store i64 0, ptr %37, align 8, !tbaa !9
  br label %186

186:                                              ; preds = %210, %178
  %187 = load i64, ptr %37, align 8, !tbaa !9
  %188 = icmp ult i64 %187, 1
  br i1 %188, label %190, label %189

189:                                              ; preds = %186
  store i32 11, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #4
  br label %213

190:                                              ; preds = %186
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.module_info_t, ptr %191, i32 0, i32 3
  %193 = getelementptr inbounds %struct.fft64_module_info_t, ptr %192, i32 0, i32 1
  %194 = load ptr, ptr %193, align 8, !tbaa !19
  %195 = load ptr, ptr %25, align 8, !tbaa !5
  %196 = load i64, ptr %35, align 8, !tbaa !9
  %197 = load i64, ptr %20, align 8, !tbaa !9
  %198 = mul i64 %196, %197
  %199 = getelementptr inbounds double, ptr %195, i64 %198
  %200 = load ptr, ptr %24, align 8, !tbaa !5
  %201 = load i64, ptr %37, align 8, !tbaa !9
  %202 = load i64, ptr %20, align 8, !tbaa !9
  %203 = mul i64 %201, %202
  %204 = getelementptr inbounds double, ptr %200, i64 %203
  %205 = load ptr, ptr %36, align 8, !tbaa !5
  %206 = load i64, ptr %37, align 8, !tbaa !9
  %207 = load i64, ptr %20, align 8, !tbaa !9
  %208 = mul i64 %206, %207
  %209 = getelementptr inbounds double, ptr %205, i64 %208
  call void @reim_fftvec_mul(ptr noundef %194, ptr noundef %199, ptr noundef %204, ptr noundef %209)
  br label %210

210:                                              ; preds = %190
  %211 = load i64, ptr %37, align 8, !tbaa !9
  %212 = add i64 %211, 1
  store i64 %212, ptr %37, align 8, !tbaa !9
  br label %186, !llvm.loop !20

213:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #4
  store i64 1, ptr %38, align 8, !tbaa !9
  br label %214

214:                                              ; preds = %239, %213
  %215 = load i64, ptr %38, align 8, !tbaa !9
  %216 = load i64, ptr %26, align 8, !tbaa !9
  %217 = icmp ult i64 %215, %216
  br i1 %217, label %219, label %218

218:                                              ; preds = %214
  store i32 14, ptr %29, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #4
  br label %242

219:                                              ; preds = %214
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.module_info_t, ptr %220, i32 0, i32 3
  %222 = getelementptr inbounds %struct.fft64_module_info_t, ptr %221, i32 0, i32 5
  %223 = load ptr, ptr %222, align 8, !tbaa !19
  %224 = load ptr, ptr %25, align 8, !tbaa !5
  %225 = load i64, ptr %35, align 8, !tbaa !9
  %226 = load i64, ptr %20, align 8, !tbaa !9
  %227 = mul i64 %225, %226
  %228 = getelementptr inbounds double, ptr %224, i64 %227
  %229 = load ptr, ptr %24, align 8, !tbaa !5
  %230 = load i64, ptr %38, align 8, !tbaa !9
  %231 = load i64, ptr %20, align 8, !tbaa !9
  %232 = mul i64 %230, %231
  %233 = getelementptr inbounds double, ptr %229, i64 %232
  %234 = load ptr, ptr %36, align 8, !tbaa !5
  %235 = load i64, ptr %38, align 8, !tbaa !9
  %236 = load i64, ptr %20, align 8, !tbaa !9
  %237 = mul i64 %235, %236
  %238 = getelementptr inbounds double, ptr %234, i64 %237
  call void @reim_fftvec_addmul(ptr noundef %223, ptr noundef %228, ptr noundef %233, ptr noundef %238)
  br label %239

239:                                              ; preds = %219
  %240 = load i64, ptr %38, align 8, !tbaa !9
  %241 = add i64 %240, 1
  store i64 %241, ptr %38, align 8, !tbaa !9
  br label %214, !llvm.loop !21

242:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #4
  br label %243

243:                                              ; preds = %242
  %244 = load i64, ptr %35, align 8, !tbaa !9
  %245 = add i64 %244, 1
  store i64 %245, ptr %35, align 8, !tbaa !9
  br label %173, !llvm.loop !22

246:                                              ; preds = %177
  br label %247

247:                                              ; preds = %246, %171
  %248 = load ptr, ptr %25, align 8, !tbaa !5
  %249 = load i64, ptr %27, align 8, !tbaa !9
  %250 = load i64, ptr %20, align 8, !tbaa !9
  %251 = mul i64 %249, %250
  %252 = getelementptr inbounds double, ptr %248, i64 %251
  %253 = load i64, ptr %12, align 8, !tbaa !9
  %254 = load i64, ptr %27, align 8, !tbaa !9
  %255 = sub i64 %253, %254
  %256 = load i64, ptr %20, align 8, !tbaa !9
  %257 = mul i64 %255, %256
  %258 = mul i64 %257, 8
  call void @llvm.memset.p0.i64(ptr align 8 %252, i8 0, i64 %258, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  ret void
}

declare void @reim4_extract_1blk_from_contiguous_reim_ref(i64 noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef) #2

declare void @reim4_vec_mat2cols_product_ref(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @reim4_save_1blk_to_reim_ref(i64 noundef, i64 noundef, ptr noundef, ptr noundef) #2

declare void @reim4_vec_mat1col_product_ref(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @reim_fftvec_mul(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @reim_fftvec_addmul(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !10, i64 16}
!12 = !{!"module_info_t", !13, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !14, i64 72}
!13 = !{!"int", !7, i64 0}
!14 = !{!"module_virtual_functions_t", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312}
!15 = !{!12, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!7, !7, i64 0}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


; 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"

; Function Attrs: nounwind uwtable
define dso_local void @fft64_vmp_apply_dft_to_dft_ref(ptr nocapture noundef readonly %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6, i64 noundef %7, ptr noundef %8) local_unnamed_addr #0 {
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load i64, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %8, i64 128
  %15 = tail call i64 @llvm.umin.i64(i64 %6, i64 %4)
  %16 = tail call i64 @llvm.umin.i64(i64 %7, i64 %2)
  %17 = icmp ugt i64 %13, 7
  br i1 %17, label %.preheader, label %.preheader116

.preheader116:                                    ; preds = %9
  %.not128 = icmp eq i64 %16, 0
  br i1 %.not128, label %.loopexit, label %.critedge.lr.ph

.critedge.lr.ph:                                  ; preds = %.preheader116
  %18 = mul i64 %13, %6
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = icmp ugt i64 %15, 1
  %21 = getelementptr inbounds i8, ptr %0, i64 64
  br i1 %20, label %.critedge.us, label %.critedge

.critedge.us:                                     ; preds = %.critedge.lr.ph, %._crit_edge.us
  %.0111119.us = phi i64 [ %33, %._crit_edge.us ], [ 0, %.critedge.lr.ph ]
  %22 = mul i64 %18, %.0111119.us
  %23 = getelementptr inbounds double, ptr %5, i64 %22
  %24 = load ptr, ptr %19, align 8, !tbaa !14
  %25 = mul i64 %.0111119.us, %13
  %26 = getelementptr inbounds double, ptr %1, i64 %25
  tail call void @reim_fftvec_mul(ptr noundef %24, ptr noundef %26, ptr noundef %3, ptr noundef %23) #4
  br label %27

27:                                               ; preds = %.critedge.us, %27
  %.0118.us = phi i64 [ 1, %.critedge.us ], [ %32, %27 ]
  %28 = load ptr, ptr %21, align 8, !tbaa !14
  %29 = mul i64 %.0118.us, %13
  %30 = getelementptr inbounds double, ptr %3, i64 %29
  %31 = getelementptr inbounds double, ptr %23, i64 %29
  tail call void @reim_fftvec_addmul(ptr noundef %28, ptr noundef %26, ptr noundef %30, ptr noundef %31) #4
  %32 = add nuw i64 %.0118.us, 1
  %exitcond136.not = icmp eq i64 %32, %15
  br i1 %exitcond136.not, label %._crit_edge.us, label %27, !llvm.loop !15

._crit_edge.us:                                   ; preds = %27
  %33 = add nuw i64 %.0111119.us, 1
  %exitcond137.not = icmp eq i64 %33, %16
  br i1 %exitcond137.not, label %.loopexit, label %.critedge.us, !llvm.loop !17

.preheader:                                       ; preds = %9
  %34 = lshr i64 %11, 2
  %.not129 = icmp ult i64 %11, 4
  br i1 %.not129, label %.loopexit, label %.lr.ph122

.lr.ph122:                                        ; preds = %.preheader
  %35 = shl i64 %6, 3
  %36 = mul i64 %35, %7
  %37 = add i64 %16, -1
  %.not130 = icmp eq i64 %37, 0
  %38 = getelementptr inbounds i8, ptr %8, i64 64
  %39 = and i64 %16, 1
  %.not = icmp eq i64 %39, 0
  %40 = mul i64 %37, %35
  %.not115 = icmp ugt i64 %7, %2
  %41 = mul i64 %13, %37
  %42 = getelementptr inbounds double, ptr %1, i64 %41
  br i1 %.not130, label %.lr.ph122.split.split, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph122, %50
  %.0110121.us = phi i64 [ %51, %50 ], [ 0, %.lr.ph122 ]
  %43 = mul i64 %36, %.0110121.us
  %44 = getelementptr inbounds double, ptr %5, i64 %43
  tail call void @reim4_extract_1blk_from_contiguous_reim_ref(i64 noundef %11, i64 noundef %15, i64 noundef %.0110121.us, ptr noundef nonnull %14, ptr noundef %3) #4
  br label %52

45:                                               ; preds = %._crit_edge.us123
  %46 = getelementptr inbounds double, ptr %44, i64 %40
  br i1 %.not115, label %48, label %47

47:                                               ; preds = %45
  tail call void @reim4_vec_mat1col_product_ref(i64 noundef %15, ptr noundef %8, ptr noundef nonnull %14, ptr noundef %46) #4
  br label %49

48:                                               ; preds = %45
  tail call void @reim4_vec_mat2cols_product_ref(i64 noundef %15, ptr noundef %8, ptr noundef nonnull %14, ptr noundef %46) #4
  br label %49

49:                                               ; preds = %48, %47
  tail call void @reim4_save_1blk_to_reim_ref(i64 noundef %11, i64 noundef %.0110121.us, ptr noundef %42, ptr noundef %8) #4
  br label %50

50:                                               ; preds = %49, %._crit_edge.us123
  %51 = add nuw nsw i64 %.0110121.us, 1
  %exitcond138.not = icmp eq i64 %51, %34
  br i1 %exitcond138.not, label %.loopexit, label %.lr.ph.us, !llvm.loop !18

52:                                               ; preds = %.lr.ph.us, %52
  %.0112120.us = phi i64 [ 0, %.lr.ph.us ], [ %60, %52 ]
  %53 = mul i64 %.0112120.us, %35
  %54 = getelementptr inbounds double, ptr %44, i64 %53
  tail call void @reim4_vec_mat2cols_product_ref(i64 noundef %15, ptr noundef %8, ptr noundef nonnull %14, ptr noundef %54) #4
  %55 = mul i64 %.0112120.us, %13
  %56 = getelementptr inbounds double, ptr %1, i64 %55
  tail call void @reim4_save_1blk_to_reim_ref(i64 noundef %11, i64 noundef %.0110121.us, ptr noundef %56, ptr noundef %8) #4
  %57 = or disjoint i64 %.0112120.us, 1
  %58 = mul i64 %57, %13
  %59 = getelementptr inbounds double, ptr %1, i64 %58
  tail call void @reim4_save_1blk_to_reim_ref(i64 noundef %11, i64 noundef %.0110121.us, ptr noundef nonnull %59, ptr noundef nonnull %38) #4
  %60 = add i64 %.0112120.us, 2
  %61 = icmp ult i64 %60, %37
  br i1 %61, label %52, label %._crit_edge.us123, !llvm.loop !19

._crit_edge.us123:                                ; preds = %52
  br i1 %.not, label %50, label %45

.lr.ph122.split.split:                            ; preds = %.lr.ph122
  %invariant.gep126 = getelementptr double, ptr %5, i64 %40
  br i1 %.not115, label %.lr.ph122.split.split.split.us, label %.lr.ph122.split.split.split

.lr.ph122.split.split.split.us:                   ; preds = %.lr.ph122.split.split, %.lr.ph122.split.split.split.us
  %.0110121.us125 = phi i64 [ %63, %.lr.ph122.split.split.split.us ], [ 0, %.lr.ph122.split.split ]
  %62 = mul i64 %36, %.0110121.us125
  tail call void @reim4_extract_1blk_from_contiguous_reim_ref(i64 noundef %11, i64 noundef %15, i64 noundef %.0110121.us125, ptr noundef nonnull %14, ptr noundef %3) #4
  %gep127 = getelementptr double, ptr %invariant.gep126, i64 %62
  tail call void @reim4_vec_mat2cols_product_ref(i64 noundef %15, ptr noundef %8, ptr noundef nonnull %14, ptr noundef %gep127) #4
  tail call void @reim4_save_1blk_to_reim_ref(i64 noundef %11, i64 noundef %.0110121.us125, ptr noundef %42, ptr noundef %8) #4
  %63 = add nuw nsw i64 %.0110121.us125, 1
  %exitcond140.not = icmp eq i64 %63, %34
  br i1 %exitcond140.not, label %.loopexit, label %.lr.ph122.split.split.split.us, !llvm.loop !18

.lr.ph122.split.split.split:                      ; preds = %.lr.ph122.split.split, %.lr.ph122.split.split.split
  %.0110121 = phi i64 [ %65, %.lr.ph122.split.split.split ], [ 0, %.lr.ph122.split.split ]
  %64 = mul i64 %36, %.0110121
  tail call void @reim4_extract_1blk_from_contiguous_reim_ref(i64 noundef %11, i64 noundef %15, i64 noundef %.0110121, ptr noundef nonnull %14, ptr noundef %3) #4
  %gep = getelementptr double, ptr %invariant.gep126, i64 %64
  tail call void @reim4_vec_mat1col_product_ref(i64 noundef %15, ptr noundef %8, ptr noundef nonnull %14, ptr noundef %gep) #4
  tail call void @reim4_save_1blk_to_reim_ref(i64 noundef %11, i64 noundef %.0110121, ptr noundef %42, ptr noundef %8) #4
  %65 = add nuw nsw i64 %.0110121, 1
  %exitcond139.not = icmp eq i64 %65, %34
  br i1 %exitcond139.not, label %.loopexit, label %.lr.ph122.split.split.split, !llvm.loop !18

.critedge:                                        ; preds = %.critedge.lr.ph, %.critedge
  %.0111119 = phi i64 [ %71, %.critedge ], [ 0, %.critedge.lr.ph ]
  %66 = mul i64 %18, %.0111119
  %67 = getelementptr inbounds double, ptr %5, i64 %66
  %68 = load ptr, ptr %19, align 8, !tbaa !14
  %69 = mul i64 %.0111119, %13
  %70 = getelementptr inbounds double, ptr %1, i64 %69
  tail call void @reim_fftvec_mul(ptr noundef %68, ptr noundef %70, ptr noundef %3, ptr noundef %67) #4
  %71 = add nuw i64 %.0111119, 1
  %exitcond.not = icmp eq i64 %71, %16
  br i1 %exitcond.not, label %.loopexit, label %.critedge, !llvm.loop !17

.loopexit:                                        ; preds = %.critedge, %._crit_edge.us, %50, %.lr.ph122.split.split.split, %.lr.ph122.split.split.split.us, %.preheader116, %.preheader
  %72 = mul i64 %13, %16
  %73 = getelementptr inbounds double, ptr %1, i64 %72
  %74 = sub i64 %2, %16
  %75 = shl i64 %74, 3
  %76 = mul i64 %75, %13
  tail call void @llvm.memset.p0.i64(ptr align 8 %73, i8 0, i64 %76, i1 false)
  ret void
}

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

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

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

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

declare void @reim_fftvec_mul(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @reim_fftvec_addmul(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 16}
!6 = !{!"module_info_t", !7, i64 0, !10, i64 8, !10, i64 16, !8, i64 24, !11, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"module_virtual_functions_t", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !12, i64 160, !12, i64 168, !12, i64 176, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !12, i64 232, !12, i64 240, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !12, i64 312}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!8, !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


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