; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (zlat2c)

; 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.doublecomplex = type { double, double }
%struct.complex = type { float, float }

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

; Function Attrs: nounwind uwtable
define dso_local void @zlat2c_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #4
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = load i32, ptr %27, align 4, !tbaa !9
  store i32 %28, ptr %17, align 4, !tbaa !9
  %29 = load i32, ptr %17, align 4, !tbaa !9
  %30 = mul nsw i32 %29, 1
  %31 = add nsw i32 1, %30
  store i32 %31, ptr %18, align 4, !tbaa !9
  %32 = load i32, ptr %18, align 4, !tbaa !9
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = sext i32 %32 to i64
  %35 = sub i64 0, %34
  %36 = getelementptr inbounds %struct.doublecomplex, ptr %33, i64 %35
  store ptr %36, ptr %10, align 8, !tbaa !5
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = load i32, ptr %37, align 4, !tbaa !9
  store i32 %38, ptr %15, align 4, !tbaa !9
  %39 = load i32, ptr %15, align 4, !tbaa !9
  %40 = mul nsw i32 %39, 1
  %41 = add nsw i32 1, %40
  store i32 %41, ptr %16, align 4, !tbaa !9
  %42 = load i32, ptr %16, align 4, !tbaa !9
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = sext i32 %42 to i64
  %45 = sub i64 0, %44
  %46 = getelementptr inbounds %struct.complex, ptr %43, i64 %45
  store ptr %46, ptr %12, align 8, !tbaa !5
  %47 = call float @slamch_(ptr noundef @.str)
  %48 = fpext float %47 to double
  store double %48, ptr %23, align 8, !tbaa !11
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = call i32 @lsame_(ptr noundef %49, ptr noundef @.str.1)
  store i32 %50, ptr %26, align 4, !tbaa !9
  %51 = load i32, ptr %26, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %169

53:                                               ; preds = %7
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !9
  store i32 %55, ptr %19, align 4, !tbaa !9
  store i32 1, ptr %25, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %165, %53
  %57 = load i32, ptr %25, align 4, !tbaa !9
  %58 = load i32, ptr %19, align 4, !tbaa !9
  %59 = icmp sle i32 %57, %58
  br i1 %59, label %60, label %168

60:                                               ; preds = %56
  %61 = load i32, ptr %25, align 4, !tbaa !9
  store i32 %61, ptr %20, align 4, !tbaa !9
  store i32 1, ptr %24, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %161, %60
  %63 = load i32, ptr %24, align 4, !tbaa !9
  %64 = load i32, ptr %20, align 4, !tbaa !9
  %65 = icmp sle i32 %63, %64
  br i1 %65, label %66, label %164

66:                                               ; preds = %62
  %67 = load i32, ptr %24, align 4, !tbaa !9
  %68 = load i32, ptr %25, align 4, !tbaa !9
  %69 = load i32, ptr %17, align 4, !tbaa !9
  %70 = mul nsw i32 %68, %69
  %71 = add nsw i32 %67, %70
  store i32 %71, ptr %21, align 4, !tbaa !9
  %72 = load i32, ptr %24, align 4, !tbaa !9
  %73 = load i32, ptr %25, align 4, !tbaa !9
  %74 = load i32, ptr %17, align 4, !tbaa !9
  %75 = mul nsw i32 %73, %74
  %76 = add nsw i32 %72, %75
  store i32 %76, ptr %22, align 4, !tbaa !9
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = load i32, ptr %21, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.doublecomplex, ptr %77, i64 %79
  %81 = getelementptr inbounds %struct.doublecomplex, ptr %80, i32 0, i32 0
  %82 = load double, ptr %81, align 8, !tbaa !13
  %83 = load double, ptr %23, align 8, !tbaa !11
  %84 = fneg double %83
  %85 = fcmp olt double %82, %84
  br i1 %85, label %124, label %86

86:                                               ; preds = %66
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = load i32, ptr %22, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds %struct.doublecomplex, ptr %87, i64 %89
  %91 = getelementptr inbounds %struct.doublecomplex, ptr %90, i32 0, i32 0
  %92 = load double, ptr %91, align 8, !tbaa !13
  %93 = load double, ptr %23, align 8, !tbaa !11
  %94 = fcmp ogt double %92, %93
  br i1 %94, label %124, label %95

95:                                               ; preds = %86
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = load i32, ptr %24, align 4, !tbaa !9
  %98 = load i32, ptr %25, align 4, !tbaa !9
  %99 = load i32, ptr %17, align 4, !tbaa !9
  %100 = mul nsw i32 %98, %99
  %101 = add nsw i32 %97, %100
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds %struct.doublecomplex, ptr %96, i64 %102
  %104 = call { double, double } @Cd(ptr noundef %103)
  %105 = extractvalue { double, double } %104, 0
  %106 = extractvalue { double, double } %104, 1
  %107 = load double, ptr %23, align 8, !tbaa !11
  %108 = fneg double %107
  %109 = fcmp olt double %106, %108
  br i1 %109, label %124, label %110

110:                                              ; preds = %95
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = load i32, ptr %24, align 4, !tbaa !9
  %113 = load i32, ptr %25, align 4, !tbaa !9
  %114 = load i32, ptr %17, align 4, !tbaa !9
  %115 = mul nsw i32 %113, %114
  %116 = add nsw i32 %112, %115
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds %struct.doublecomplex, ptr %111, i64 %117
  %119 = call { double, double } @Cd(ptr noundef %118)
  %120 = extractvalue { double, double } %119, 0
  %121 = extractvalue { double, double } %119, 1
  %122 = load double, ptr %23, align 8, !tbaa !11
  %123 = fcmp ogt double %121, %122
  br i1 %123, label %124, label %126

124:                                              ; preds = %110, %95, %86, %66
  %125 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 1, ptr %125, align 4, !tbaa !9
  br label %288

126:                                              ; preds = %110
  %127 = load i32, ptr %24, align 4, !tbaa !9
  %128 = load i32, ptr %25, align 4, !tbaa !9
  %129 = load i32, ptr %15, align 4, !tbaa !9
  %130 = mul nsw i32 %128, %129
  %131 = add nsw i32 %127, %130
  store i32 %131, ptr %21, align 4, !tbaa !9
  %132 = load i32, ptr %24, align 4, !tbaa !9
  %133 = load i32, ptr %25, align 4, !tbaa !9
  %134 = load i32, ptr %17, align 4, !tbaa !9
  %135 = mul nsw i32 %133, %134
  %136 = add nsw i32 %132, %135
  store i32 %136, ptr %22, align 4, !tbaa !9
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = load i32, ptr %22, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds %struct.doublecomplex, ptr %137, i64 %139
  %141 = getelementptr inbounds %struct.doublecomplex, ptr %140, i32 0, i32 0
  %142 = load double, ptr %141, align 8, !tbaa !13
  %143 = fptrunc double %142 to float
  %144 = load ptr, ptr %12, align 8, !tbaa !5
  %145 = load i32, ptr %21, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.complex, ptr %144, i64 %146
  %148 = getelementptr inbounds %struct.complex, ptr %147, i32 0, i32 0
  store float %143, ptr %148, align 4, !tbaa !15
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = load i32, ptr %22, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds %struct.doublecomplex, ptr %149, i64 %151
  %153 = getelementptr inbounds %struct.doublecomplex, ptr %152, i32 0, i32 1
  %154 = load double, ptr %153, align 8, !tbaa !18
  %155 = fptrunc double %154 to float
  %156 = load ptr, ptr %12, align 8, !tbaa !5
  %157 = load i32, ptr %21, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds %struct.complex, ptr %156, i64 %158
  %160 = getelementptr inbounds %struct.complex, ptr %159, i32 0, i32 1
  store float %155, ptr %160, align 4, !tbaa !19
  br label %161

161:                                              ; preds = %126
  %162 = load i32, ptr %24, align 4, !tbaa !9
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %24, align 4, !tbaa !9
  br label %62, !llvm.loop !20

164:                                              ; preds = %62
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %25, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %25, align 4, !tbaa !9
  br label %56, !llvm.loop !22

168:                                              ; preds = %56
  br label %287

169:                                              ; preds = %7
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = load i32, ptr %170, align 4, !tbaa !9
  store i32 %171, ptr %19, align 4, !tbaa !9
  store i32 1, ptr %25, align 4, !tbaa !9
  br label %172

172:                                              ; preds = %283, %169
  %173 = load i32, ptr %25, align 4, !tbaa !9
  %174 = load i32, ptr %19, align 4, !tbaa !9
  %175 = icmp sle i32 %173, %174
  br i1 %175, label %176, label %286

176:                                              ; preds = %172
  %177 = load ptr, ptr %9, align 8, !tbaa !5
  %178 = load i32, ptr %177, align 4, !tbaa !9
  store i32 %178, ptr %20, align 4, !tbaa !9
  %179 = load i32, ptr %25, align 4, !tbaa !9
  store i32 %179, ptr %24, align 4, !tbaa !9
  br label %180

180:                                              ; preds = %279, %176
  %181 = load i32, ptr %24, align 4, !tbaa !9
  %182 = load i32, ptr %20, align 4, !tbaa !9
  %183 = icmp sle i32 %181, %182
  br i1 %183, label %184, label %282

184:                                              ; preds = %180
  %185 = load i32, ptr %24, align 4, !tbaa !9
  %186 = load i32, ptr %25, align 4, !tbaa !9
  %187 = load i32, ptr %17, align 4, !tbaa !9
  %188 = mul nsw i32 %186, %187
  %189 = add nsw i32 %185, %188
  store i32 %189, ptr %21, align 4, !tbaa !9
  %190 = load i32, ptr %24, align 4, !tbaa !9
  %191 = load i32, ptr %25, align 4, !tbaa !9
  %192 = load i32, ptr %17, align 4, !tbaa !9
  %193 = mul nsw i32 %191, %192
  %194 = add nsw i32 %190, %193
  store i32 %194, ptr %22, align 4, !tbaa !9
  %195 = load ptr, ptr %10, align 8, !tbaa !5
  %196 = load i32, ptr %21, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds %struct.doublecomplex, ptr %195, i64 %197
  %199 = getelementptr inbounds %struct.doublecomplex, ptr %198, i32 0, i32 0
  %200 = load double, ptr %199, align 8, !tbaa !13
  %201 = load double, ptr %23, align 8, !tbaa !11
  %202 = fneg double %201
  %203 = fcmp olt double %200, %202
  br i1 %203, label %242, label %204

204:                                              ; preds = %184
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = load i32, ptr %22, align 4, !tbaa !9
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds %struct.doublecomplex, ptr %205, i64 %207
  %209 = getelementptr inbounds %struct.doublecomplex, ptr %208, i32 0, i32 0
  %210 = load double, ptr %209, align 8, !tbaa !13
  %211 = load double, ptr %23, align 8, !tbaa !11
  %212 = fcmp ogt double %210, %211
  br i1 %212, label %242, label %213

213:                                              ; preds = %204
  %214 = load ptr, ptr %10, align 8, !tbaa !5
  %215 = load i32, ptr %24, align 4, !tbaa !9
  %216 = load i32, ptr %25, align 4, !tbaa !9
  %217 = load i32, ptr %17, align 4, !tbaa !9
  %218 = mul nsw i32 %216, %217
  %219 = add nsw i32 %215, %218
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds %struct.doublecomplex, ptr %214, i64 %220
  %222 = call { double, double } @Cd(ptr noundef %221)
  %223 = extractvalue { double, double } %222, 0
  %224 = extractvalue { double, double } %222, 1
  %225 = load double, ptr %23, align 8, !tbaa !11
  %226 = fneg double %225
  %227 = fcmp olt double %224, %226
  br i1 %227, label %242, label %228

228:                                              ; preds = %213
  %229 = load ptr, ptr %10, align 8, !tbaa !5
  %230 = load i32, ptr %24, align 4, !tbaa !9
  %231 = load i32, ptr %25, align 4, !tbaa !9
  %232 = load i32, ptr %17, align 4, !tbaa !9
  %233 = mul nsw i32 %231, %232
  %234 = add nsw i32 %230, %233
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds %struct.doublecomplex, ptr %229, i64 %235
  %237 = call { double, double } @Cd(ptr noundef %236)
  %238 = extractvalue { double, double } %237, 0
  %239 = extractvalue { double, double } %237, 1
  %240 = load double, ptr %23, align 8, !tbaa !11
  %241 = fcmp ogt double %239, %240
  br i1 %241, label %242, label %244

242:                                              ; preds = %228, %213, %204, %184
  %243 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 1, ptr %243, align 4, !tbaa !9
  br label %288

244:                                              ; preds = %228
  %245 = load i32, ptr %24, align 4, !tbaa !9
  %246 = load i32, ptr %25, align 4, !tbaa !9
  %247 = load i32, ptr %15, align 4, !tbaa !9
  %248 = mul nsw i32 %246, %247
  %249 = add nsw i32 %245, %248
  store i32 %249, ptr %21, align 4, !tbaa !9
  %250 = load i32, ptr %24, align 4, !tbaa !9
  %251 = load i32, ptr %25, align 4, !tbaa !9
  %252 = load i32, ptr %17, align 4, !tbaa !9
  %253 = mul nsw i32 %251, %252
  %254 = add nsw i32 %250, %253
  store i32 %254, ptr %22, align 4, !tbaa !9
  %255 = load ptr, ptr %10, align 8, !tbaa !5
  %256 = load i32, ptr %22, align 4, !tbaa !9
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds %struct.doublecomplex, ptr %255, i64 %257
  %259 = getelementptr inbounds %struct.doublecomplex, ptr %258, i32 0, i32 0
  %260 = load double, ptr %259, align 8, !tbaa !13
  %261 = fptrunc double %260 to float
  %262 = load ptr, ptr %12, align 8, !tbaa !5
  %263 = load i32, ptr %21, align 4, !tbaa !9
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds %struct.complex, ptr %262, i64 %264
  %266 = getelementptr inbounds %struct.complex, ptr %265, i32 0, i32 0
  store float %261, ptr %266, align 4, !tbaa !15
  %267 = load ptr, ptr %10, align 8, !tbaa !5
  %268 = load i32, ptr %22, align 4, !tbaa !9
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds %struct.doublecomplex, ptr %267, i64 %269
  %271 = getelementptr inbounds %struct.doublecomplex, ptr %270, i32 0, i32 1
  %272 = load double, ptr %271, align 8, !tbaa !18
  %273 = fptrunc double %272 to float
  %274 = load ptr, ptr %12, align 8, !tbaa !5
  %275 = load i32, ptr %21, align 4, !tbaa !9
  %276 = sext i32 %275 to i64
  %277 = getelementptr inbounds %struct.complex, ptr %274, i64 %276
  %278 = getelementptr inbounds %struct.complex, ptr %277, i32 0, i32 1
  store float %273, ptr %278, align 4, !tbaa !19
  br label %279

279:                                              ; preds = %244
  %280 = load i32, ptr %24, align 4, !tbaa !9
  %281 = add nsw i32 %280, 1
  store i32 %281, ptr %24, align 4, !tbaa !9
  br label %180, !llvm.loop !23

282:                                              ; preds = %180
  br label %283

283:                                              ; preds = %282
  %284 = load i32, ptr %25, align 4, !tbaa !9
  %285 = add nsw i32 %284, 1
  store i32 %285, ptr %25, align 4, !tbaa !9
  br label %172, !llvm.loop !24

286:                                              ; preds = %172
  br label %287

287:                                              ; preds = %286, %168
  br label %288

288:                                              ; preds = %287, %242, %124
  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 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  ret void
}

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

declare float @slamch_(ptr noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @Cd(ptr noundef) #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 = { "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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"", !12, i64 0, !12, i64 8}
!15 = !{!16, !17, i64 0}
!16 = !{!"", !17, i64 0, !17, i64 4}
!17 = !{!"float", !7, i64 0}
!18 = !{!14, !12, i64 8}
!19 = !{!16, !17, i64 4}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}


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

%struct.doublecomplex = type { double, double }
%struct.complex = type { float, float }

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

; Function Attrs: nounwind uwtable
define dso_local void @zlat2c_(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef writeonly %4, ptr nocapture noundef readonly %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #0 {
  %8 = load i32, ptr %3, align 4, !tbaa !5
  %narrow = xor i32 %8, -1
  %9 = sext i32 %narrow to i64
  %10 = getelementptr inbounds %struct.doublecomplex, ptr %2, i64 %9
  %11 = load i32, ptr %5, align 4, !tbaa !5
  %narrow108 = xor i32 %11, -1
  %12 = sext i32 %narrow108 to i64
  %13 = getelementptr inbounds %struct.complex, ptr %4, i64 %12
  %14 = tail call float @slamch_(ptr noundef nonnull @.str) #3
  %15 = fpext float %14 to double
  %16 = tail call i32 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #3
  %.not = icmp eq i32 %16, 0
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %.not109120 = icmp slt i32 %17, 1
  br i1 %.not, label %41, label %18

18:                                               ; preds = %7
  br i1 %.not109120, label %.loopexit, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %18
  %19 = fneg double %15
  %20 = sext i32 %8 to i64
  %21 = sext i32 %11 to i64
  %22 = add nuw i32 %17, 1
  %wide.trip.count135 = zext i32 %22 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %40
  %indvars.iv130 = phi i64 [ 1, %.preheader.lr.ph ], [ %indvars.iv.next131, %40 ]
  %indvars.iv128 = phi i64 [ 2, %.preheader.lr.ph ], [ %indvars.iv.next129, %40 ]
  %23 = mul nsw i64 %indvars.iv130, %20
  %24 = mul nsw i64 %indvars.iv130, %21
  %invariant.gep = getelementptr %struct.doublecomplex, ptr %10, i64 %23
  %invariant.gep147 = getelementptr %struct.complex, ptr %13, i64 %24
  br label %25

25:                                               ; preds = %.preheader, %37
  %indvars.iv = phi i64 [ 1, %.preheader ], [ %indvars.iv.next, %37 ]
  %gep = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %indvars.iv
  %26 = load double, ptr %gep, align 8, !tbaa !9
  %27 = fcmp olt double %26, %19
  %28 = fcmp ogt double %26, %15
  %or.cond = or i1 %27, %28
  br i1 %or.cond, label %.loopexit.sink.split, label %29

29:                                               ; preds = %25
  %30 = tail call { double, double } @Cd(ptr noundef nonnull %gep)
  %31 = extractvalue { double, double } %30, 1
  %32 = fcmp olt double %31, %19
  br i1 %32, label %.loopexit.sink.split, label %33

33:                                               ; preds = %29
  %34 = tail call { double, double } @Cd(ptr noundef nonnull %gep)
  %35 = extractvalue { double, double } %34, 1
  %36 = fcmp ogt double %35, %15
  br i1 %36, label %.loopexit.sink.split, label %37

37:                                               ; preds = %33
  %gep148 = getelementptr %struct.complex, ptr %invariant.gep147, i64 %indvars.iv
  %38 = load <2 x double>, ptr %gep, align 8, !tbaa !12
  %39 = fptrunc <2 x double> %38 to <2 x float>
  store <2 x float> %39, ptr %gep148, align 4, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv128
  br i1 %exitcond.not, label %40, label %25, !llvm.loop !15

40:                                               ; preds = %37
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1
  %exitcond136.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count135
  br i1 %exitcond136.not, label %.loopexit, label %.preheader, !llvm.loop !17

41:                                               ; preds = %7
  br i1 %.not109120, label %.loopexit, label %.lr.ph123

.lr.ph123:                                        ; preds = %41
  %42 = fneg double %15
  %43 = sext i32 %8 to i64
  %44 = sext i32 %11 to i64
  %45 = add nuw i32 %17, 1
  %wide.trip.count144 = zext i32 %45 to i64
  br label %46

46:                                               ; preds = %.lr.ph123, %._crit_edge
  %indvars.iv137 = phi i64 [ 1, %.lr.ph123 ], [ %indvars.iv.next138, %._crit_edge ]
  %47 = load i32, ptr %1, align 4, !tbaa !5
  %48 = sext i32 %47 to i64
  %.not110118 = icmp sgt i64 %indvars.iv137, %48
  br i1 %.not110118, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %46
  %49 = mul nsw i64 %indvars.iv137, %43
  %50 = mul nsw i64 %indvars.iv137, %44
  %51 = add i32 %47, 1
  %wide.trip.count = zext i32 %51 to i64
  %invariant.gep149 = getelementptr %struct.doublecomplex, ptr %10, i64 %49
  %invariant.gep151 = getelementptr %struct.complex, ptr %13, i64 %50
  br label %52

52:                                               ; preds = %.lr.ph, %64
  %indvars.iv139 = phi i64 [ %indvars.iv137, %.lr.ph ], [ %indvars.iv.next140, %64 ]
  %gep150 = getelementptr %struct.doublecomplex, ptr %invariant.gep149, i64 %indvars.iv139
  %53 = load double, ptr %gep150, align 8, !tbaa !9
  %54 = fcmp olt double %53, %42
  %55 = fcmp ogt double %53, %15
  %or.cond113 = or i1 %54, %55
  br i1 %or.cond113, label %.loopexit.sink.split, label %56

56:                                               ; preds = %52
  %57 = tail call { double, double } @Cd(ptr noundef nonnull %gep150)
  %58 = extractvalue { double, double } %57, 1
  %59 = fcmp olt double %58, %42
  br i1 %59, label %.loopexit.sink.split, label %60

60:                                               ; preds = %56
  %61 = tail call { double, double } @Cd(ptr noundef nonnull %gep150)
  %62 = extractvalue { double, double } %61, 1
  %63 = fcmp ogt double %62, %15
  br i1 %63, label %.loopexit.sink.split, label %64

64:                                               ; preds = %60
  %gep152 = getelementptr %struct.complex, ptr %invariant.gep151, i64 %indvars.iv139
  %65 = load <2 x double>, ptr %gep150, align 8, !tbaa !12
  %66 = fptrunc <2 x double> %65 to <2 x float>
  store <2 x float> %66, ptr %gep152, align 4, !tbaa !13
  %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1
  %exitcond142.not = icmp eq i64 %indvars.iv.next140, %wide.trip.count
  br i1 %exitcond142.not, label %._crit_edge, label %52, !llvm.loop !18

._crit_edge:                                      ; preds = %64, %46
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next138, %wide.trip.count144
  br i1 %exitcond145.not, label %.loopexit, label %46, !llvm.loop !19

.loopexit.sink.split:                             ; preds = %25, %29, %33, %52, %56, %60
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %40, %._crit_edge, %.loopexit.sink.split, %18, %41
  ret void
}

declare float @slamch_(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @Cd(ptr noundef) 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 = { "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 = { 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 = { 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 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 8}
!11 = !{!"double", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, 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: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass