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

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

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @cgehd2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #0 {
  %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 ptr, 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 i32, align 4
  %22 = alloca %struct.complex, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.complex, align 4
  %25 = alloca i32, align 4
  %26 = alloca { float, float }, 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 ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %27 = load ptr, ptr %13, 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 %12, align 8, !tbaa !5
  %34 = sext i32 %32 to i64
  %35 = sub i64 0, %34
  %36 = getelementptr inbounds %struct.complex, ptr %33, i64 %35
  store ptr %36, ptr %12, align 8, !tbaa !5
  %37 = load ptr, ptr %14, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.complex, ptr %37, i32 -1
  store ptr %38, ptr %14, align 8, !tbaa !5
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.complex, ptr %39, i32 -1
  store ptr %40, ptr %15, align 8, !tbaa !5
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 0, ptr %41, align 4, !tbaa !9
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = icmp slt i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %8
  %46 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -1, ptr %46, align 4, !tbaa !9
  br label %109

47:                                               ; preds = %8
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = icmp slt i32 %49, 1
  br i1 %50, label %64, label %51

51:                                               ; preds = %47
  %52 = load ptr, ptr %10, align 8, !tbaa !5
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp sge i32 1, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  br label %61

58:                                               ; preds = %51
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = load i32, ptr %59, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %58, %57
  %62 = phi i32 [ 1, %57 ], [ %60, %58 ]
  %63 = icmp sgt i32 %53, %62
  br i1 %63, label %64, label %66

64:                                               ; preds = %61, %47
  %65 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -2, ptr %65, align 4, !tbaa !9
  br label %108

66:                                               ; preds = %61
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = icmp sle i32 %70, %72
  br i1 %73, label %74, label %77

74:                                               ; preds = %66
  %75 = load ptr, ptr %10, align 8, !tbaa !5
  %76 = load i32, ptr %75, align 4, !tbaa !9
  br label %80

77:                                               ; preds = %66
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load i32, ptr %78, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %77, %74
  %81 = phi i32 [ %76, %74 ], [ %79, %77 ]
  %82 = icmp slt i32 %68, %81
  br i1 %82, label %89, label %83

83:                                               ; preds = %80
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = load i32, ptr %84, align 4, !tbaa !9
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = icmp sgt i32 %85, %87
  br i1 %88, label %89, label %91

89:                                               ; preds = %83, %80
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -3, ptr %90, align 4, !tbaa !9
  br label %107

91:                                               ; preds = %83
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = load i32, ptr %92, align 4, !tbaa !9
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = icmp sge i32 1, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %91
  br label %101

98:                                               ; preds = %91
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load i32, ptr %99, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %98, %97
  %102 = phi i32 [ 1, %97 ], [ %100, %98 ]
  %103 = icmp slt i32 %93, %102
  br i1 %103, label %104, label %106

104:                                              ; preds = %101
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  store i32 -5, ptr %105, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %104, %101
  br label %107

107:                                              ; preds = %106, %89
  br label %108

108:                                              ; preds = %107, %64
  br label %109

109:                                              ; preds = %108, %45
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %118

113:                                              ; preds = %109
  %114 = load ptr, ptr %16, align 8, !tbaa !5
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = sub nsw i32 0, %115
  store i32 %116, ptr %19, align 4, !tbaa !9
  %117 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %19, i32 noundef 6)
  store i32 1, ptr %25, align 4
  br label %289

118:                                              ; preds = %109
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sub nsw i32 %120, 1
  store i32 %121, ptr %19, align 4, !tbaa !9
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = load i32, ptr %122, align 4, !tbaa !9
  store i32 %123, ptr %23, align 4, !tbaa !9
  br label %124

124:                                              ; preds = %285, %118
  %125 = load i32, ptr %23, align 4, !tbaa !9
  %126 = load i32, ptr %19, align 4, !tbaa !9
  %127 = icmp sle i32 %125, %126
  br i1 %127, label %128, label %288

128:                                              ; preds = %124
  %129 = load i32, ptr %23, align 4, !tbaa !9
  %130 = add nsw i32 %129, 1
  %131 = load i32, ptr %23, align 4, !tbaa !9
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = mul nsw i32 %131, %132
  %134 = add nsw i32 %130, %133
  store i32 %134, ptr %20, align 4, !tbaa !9
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = load i32, ptr %20, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.complex, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.complex, ptr %138, i32 0, i32 0
  %140 = load float, ptr %139, align 4, !tbaa !11
  %141 = getelementptr inbounds %struct.complex, ptr %24, i32 0, i32 0
  store float %140, ptr %141, align 4, !tbaa !11
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = load i32, ptr %20, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds %struct.complex, ptr %142, i64 %144
  %146 = getelementptr inbounds %struct.complex, ptr %145, i32 0, i32 1
  %147 = load float, ptr %146, align 4, !tbaa !14
  %148 = getelementptr inbounds %struct.complex, ptr %24, i32 0, i32 1
  store float %147, ptr %148, align 4, !tbaa !14
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = load i32, ptr %23, align 4, !tbaa !9
  %152 = sub nsw i32 %150, %151
  store i32 %152, ptr %20, align 4, !tbaa !9
  %153 = load i32, ptr %23, align 4, !tbaa !9
  %154 = add nsw i32 %153, 2
  store i32 %154, ptr %21, align 4, !tbaa !9
  %155 = load ptr, ptr %12, align 8, !tbaa !5
  %156 = load i32, ptr %21, align 4, !tbaa !9
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = icmp sle i32 %156, %158
  br i1 %159, label %160, label %162

160:                                              ; preds = %128
  %161 = load i32, ptr %21, align 4, !tbaa !9
  br label %165

162:                                              ; preds = %128
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = load i32, ptr %163, align 4, !tbaa !9
  br label %165

165:                                              ; preds = %162, %160
  %166 = phi i32 [ %161, %160 ], [ %164, %162 ]
  %167 = load i32, ptr %23, align 4, !tbaa !9
  %168 = load i32, ptr %17, align 4, !tbaa !9
  %169 = mul nsw i32 %167, %168
  %170 = add nsw i32 %166, %169
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds %struct.complex, ptr %155, i64 %171
  %173 = load ptr, ptr %14, align 8, !tbaa !5
  %174 = load i32, ptr %23, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds %struct.complex, ptr %173, i64 %175
  call void @clarfg_(ptr noundef %20, ptr noundef %24, ptr noundef %172, ptr noundef @c__1, ptr noundef %176)
  %177 = load i32, ptr %23, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  %179 = load i32, ptr %23, align 4, !tbaa !9
  %180 = load i32, ptr %17, align 4, !tbaa !9
  %181 = mul nsw i32 %179, %180
  %182 = add nsw i32 %178, %181
  store i32 %182, ptr %20, align 4, !tbaa !9
  %183 = load ptr, ptr %12, align 8, !tbaa !5
  %184 = load i32, ptr %20, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds %struct.complex, ptr %183, i64 %185
  %187 = getelementptr inbounds %struct.complex, ptr %186, i32 0, i32 0
  store float 1.000000e+00, ptr %187, align 4, !tbaa !11
  %188 = load ptr, ptr %12, align 8, !tbaa !5
  %189 = load i32, ptr %20, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds %struct.complex, ptr %188, i64 %190
  %192 = getelementptr inbounds %struct.complex, ptr %191, i32 0, i32 1
  store float 0.000000e+00, ptr %192, align 4, !tbaa !14
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  %194 = load i32, ptr %193, align 4, !tbaa !9
  %195 = load i32, ptr %23, align 4, !tbaa !9
  %196 = sub nsw i32 %194, %195
  store i32 %196, ptr %20, align 4, !tbaa !9
  %197 = load ptr, ptr %11, align 8, !tbaa !5
  %198 = load ptr, ptr %12, align 8, !tbaa !5
  %199 = load i32, ptr %23, align 4, !tbaa !9
  %200 = add nsw i32 %199, 1
  %201 = load i32, ptr %23, align 4, !tbaa !9
  %202 = load i32, ptr %17, align 4, !tbaa !9
  %203 = mul nsw i32 %201, %202
  %204 = add nsw i32 %200, %203
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds %struct.complex, ptr %198, i64 %205
  %207 = load ptr, ptr %14, align 8, !tbaa !5
  %208 = load i32, ptr %23, align 4, !tbaa !9
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds %struct.complex, ptr %207, i64 %209
  %211 = load ptr, ptr %12, align 8, !tbaa !5
  %212 = load i32, ptr %23, align 4, !tbaa !9
  %213 = add nsw i32 %212, 1
  %214 = load i32, ptr %17, align 4, !tbaa !9
  %215 = mul nsw i32 %213, %214
  %216 = add nsw i32 %215, 1
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds %struct.complex, ptr %211, i64 %217
  %219 = load ptr, ptr %13, align 8, !tbaa !5
  %220 = load ptr, ptr %15, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.complex, ptr %220, i64 1
  call void @clarf_(ptr noundef @.str.1, ptr noundef %197, ptr noundef %20, ptr noundef %206, ptr noundef @c__1, ptr noundef %210, ptr noundef %218, ptr noundef %219, ptr noundef %221)
  %222 = load ptr, ptr %11, align 8, !tbaa !5
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = load i32, ptr %23, align 4, !tbaa !9
  %225 = sub nsw i32 %223, %224
  store i32 %225, ptr %20, align 4, !tbaa !9
  %226 = load ptr, ptr %9, align 8, !tbaa !5
  %227 = load i32, ptr %226, align 4, !tbaa !9
  %228 = load i32, ptr %23, align 4, !tbaa !9
  %229 = sub nsw i32 %227, %228
  store i32 %229, ptr %21, align 4, !tbaa !9
  %230 = load ptr, ptr %14, align 8, !tbaa !5
  %231 = load i32, ptr %23, align 4, !tbaa !9
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds %struct.complex, ptr %230, i64 %232
  %234 = call <2 x float> @Cf(ptr noundef %233)
  store <2 x float> %234, ptr %26, align 4
  %235 = getelementptr inbounds { float, float }, ptr %26, i32 0, i32 0
  %236 = load float, ptr %235, align 4
  %237 = getelementptr inbounds { float, float }, ptr %26, i32 0, i32 1
  %238 = load float, ptr %237, align 4
  %239 = fneg float %238
  %240 = call ptr @_pCf(ptr noundef %22)
  %241 = getelementptr inbounds { float, float }, ptr %240, i32 0, i32 0
  %242 = getelementptr inbounds { float, float }, ptr %240, i32 0, i32 1
  store float %236, ptr %241, align 4
  store float %239, ptr %242, align 4
  %243 = load ptr, ptr %12, align 8, !tbaa !5
  %244 = load i32, ptr %23, align 4, !tbaa !9
  %245 = add nsw i32 %244, 1
  %246 = load i32, ptr %23, align 4, !tbaa !9
  %247 = load i32, ptr %17, align 4, !tbaa !9
  %248 = mul nsw i32 %246, %247
  %249 = add nsw i32 %245, %248
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds %struct.complex, ptr %243, i64 %250
  %252 = load ptr, ptr %12, align 8, !tbaa !5
  %253 = load i32, ptr %23, align 4, !tbaa !9
  %254 = add nsw i32 %253, 1
  %255 = load i32, ptr %23, align 4, !tbaa !9
  %256 = add nsw i32 %255, 1
  %257 = load i32, ptr %17, align 4, !tbaa !9
  %258 = mul nsw i32 %256, %257
  %259 = add nsw i32 %254, %258
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds %struct.complex, ptr %252, i64 %260
  %262 = load ptr, ptr %13, align 8, !tbaa !5
  %263 = load ptr, ptr %15, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.complex, ptr %263, i64 1
  call void @clarf_(ptr noundef @.str.2, ptr noundef %20, ptr noundef %21, ptr noundef %251, ptr noundef @c__1, ptr noundef %22, ptr noundef %261, ptr noundef %262, ptr noundef %264)
  %265 = load i32, ptr %23, align 4, !tbaa !9
  %266 = add nsw i32 %265, 1
  %267 = load i32, ptr %23, align 4, !tbaa !9
  %268 = load i32, ptr %17, align 4, !tbaa !9
  %269 = mul nsw i32 %267, %268
  %270 = add nsw i32 %266, %269
  store i32 %270, ptr %20, align 4, !tbaa !9
  %271 = getelementptr inbounds %struct.complex, ptr %24, i32 0, i32 0
  %272 = load float, ptr %271, align 4, !tbaa !11
  %273 = load ptr, ptr %12, align 8, !tbaa !5
  %274 = load i32, ptr %20, align 4, !tbaa !9
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds %struct.complex, ptr %273, i64 %275
  %277 = getelementptr inbounds %struct.complex, ptr %276, i32 0, i32 0
  store float %272, ptr %277, align 4, !tbaa !11
  %278 = getelementptr inbounds %struct.complex, ptr %24, i32 0, i32 1
  %279 = load float, ptr %278, align 4, !tbaa !14
  %280 = load ptr, ptr %12, align 8, !tbaa !5
  %281 = load i32, ptr %20, align 4, !tbaa !9
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds %struct.complex, ptr %280, i64 %282
  %284 = getelementptr inbounds %struct.complex, ptr %283, i32 0, i32 1
  store float %279, ptr %284, align 4, !tbaa !14
  br label %285

285:                                              ; preds = %165
  %286 = load i32, ptr %23, align 4, !tbaa !9
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %23, align 4, !tbaa !9
  br label %124, !llvm.loop !15

288:                                              ; preds = %124
  store i32 1, ptr %25, align 4
  br label %289

289:                                              ; preds = %288, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  ret void
}

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @Cf(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCf(ptr noundef) #4

; 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"="64" "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"="64" "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 = { 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 #5 = { 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, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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

%struct.complex = type { float, float }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@c__1 = external hidden global i32, align 4
@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @cgehd2_(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr nocapture noundef writeonly %7) local_unnamed_addr #0 {
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.complex, align 4
  %13 = alloca %struct.complex, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %narrow = xor i32 %14, -1
  %15 = sext i32 %narrow to i64
  %16 = getelementptr inbounds %struct.complex, ptr %3, i64 %15
  %17 = getelementptr inbounds i8, ptr %5, i64 -8
  store i32 0, ptr %7, align 4, !tbaa !5
  %18 = load i32, ptr %0, align 4, !tbaa !5
  %19 = icmp slt i32 %18, 0
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %8
  %21 = load i32, ptr %1, align 4, !tbaa !5
  %22 = icmp slt i32 %21, 1
  br i1 %22, label %.thread, label %23

23:                                               ; preds = %20
  %spec.select = tail call i32 @llvm.umax.i32(i32 %18, i32 1)
  %24 = icmp ugt i32 %21, %spec.select
  br i1 %24, label %.thread, label %25

25:                                               ; preds = %23
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %. = tail call i32 @llvm.umin.i32(i32 %21, i32 %18)
  %27 = icmp slt i32 %26, %.
  %28 = icmp ugt i32 %26, %18
  %or.cond = or i1 %27, %28
  br i1 %or.cond, label %.thread, label %29

29:                                               ; preds = %25
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = icmp slt i32 %30, %spec.select
  br i1 %31, label %.thread, label %33

.thread:                                          ; preds = %29, %25, %20, %23, %8
  %.sink = phi i32 [ -1, %8 ], [ -2, %23 ], [ -2, %20 ], [ -3, %25 ], [ -5, %29 ]
  %.neg = phi i32 [ 1, %8 ], [ 2, %23 ], [ 2, %20 ], [ 3, %25 ], [ 5, %29 ]
  store i32 %.sink, ptr %7, align 4, !tbaa !5
  store i32 %.neg, ptr %9, align 4, !tbaa !5
  %32 = call i32 @xerbla_(ptr noundef nonnull @.str, ptr noundef nonnull %9, i32 noundef 6) #6
  br label %.loopexit

33:                                               ; preds = %29
  %invariant.gep = getelementptr i8, ptr %16, i64 8
  %.not95100.not = icmp ult i32 %21, %26
  br i1 %.not95100.not, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %33
  %34 = add nsw i32 %26, -1
  %35 = zext nneg i32 %21 to i64
  %36 = sext i32 %14 to i64
  %37 = sext i32 %34 to i64
  br label %38

38:                                               ; preds = %.lr.ph, %38
  %indvars.iv = phi i64 [ %35, %.lr.ph ], [ %indvars.iv.next, %38 ]
  %indvars102 = trunc i64 %indvars.iv to i32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %indvars = trunc i64 %indvars.iv.next to i32
  %39 = mul nsw i64 %indvars.iv, %36
  %40 = mul nsw i32 %14, %indvars102
  %41 = add nsw i32 %40, %indvars
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.complex, ptr %16, i64 %42
  %44 = load <2 x float>, ptr %43, align 4, !tbaa !9
  store <2 x float> %44, ptr %13, align 8, !tbaa !9
  %45 = load i32, ptr %2, align 4, !tbaa !5
  %46 = sub nsw i32 %45, %indvars102
  store i32 %46, ptr %10, align 4, !tbaa !5
  %47 = trunc i64 %indvars.iv to i32
  %48 = add i32 %47, 2
  store i32 %48, ptr %11, align 4, !tbaa !5
  %49 = load i32, ptr %0, align 4, !tbaa !5
  %.98 = call i32 @llvm.smin.i32(i32 %48, i32 %49)
  %50 = sext i32 %.98 to i64
  %51 = getelementptr %struct.complex, ptr %16, i64 %39
  %52 = getelementptr %struct.complex, ptr %51, i64 %50
  %53 = getelementptr inbounds %struct.complex, ptr %17, i64 %indvars.iv
  call void @clarfg_(ptr noundef nonnull %10, ptr noundef nonnull %13, ptr noundef %52, ptr noundef nonnull @c__1, ptr noundef nonnull %53) #6
  store <2 x float> <float 1.000000e+00, float 0.000000e+00>, ptr %43, align 4, !tbaa !9
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sub nsw i32 %54, %indvars102
  store i32 %55, ptr %10, align 4, !tbaa !5
  %56 = mul nsw i64 %indvars.iv.next, %36
  %57 = mul nsw i32 %14, %indvars
  %gep = getelementptr %struct.complex, ptr %invariant.gep, i64 %56
  call void @clarf_(ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef nonnull %10, ptr noundef nonnull %43, ptr noundef nonnull @c__1, ptr noundef nonnull %53, ptr noundef %gep, ptr noundef nonnull %4, ptr noundef %6) #6
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = sub nsw i32 %58, %indvars102
  store i32 %59, ptr %10, align 4, !tbaa !5
  %60 = load i32, ptr %0, align 4, !tbaa !5
  %61 = sub nsw i32 %60, %indvars102
  store i32 %61, ptr %11, align 4, !tbaa !5
  %62 = call <2 x float> @Cf(ptr noundef nonnull %53)
  %.sroa.0.0.vec.extract = extractelement <2 x float> %62, i64 0
  %.sroa.0.4.vec.extract = extractelement <2 x float> %62, i64 1
  %63 = fneg float %.sroa.0.4.vec.extract
  %64 = call ptr @_pCf(ptr noundef nonnull %12)
  %65 = getelementptr inbounds i8, ptr %64, i64 4
  store float %.sroa.0.0.vec.extract, ptr %64, align 4
  store float %63, ptr %65, align 4
  %66 = sext i32 %57 to i64
  %67 = getelementptr %struct.complex, ptr %16, i64 %indvars.iv.next
  %68 = getelementptr %struct.complex, ptr %67, i64 %66
  call void @clarf_(ptr noundef nonnull @.str.2, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %43, ptr noundef nonnull @c__1, ptr noundef nonnull %12, ptr noundef %68, ptr noundef nonnull %4, ptr noundef %6) #6
  store i32 %41, ptr %10, align 4, !tbaa !5
  %69 = load <2 x float>, ptr %13, align 8, !tbaa !9
  store <2 x float> %69, ptr %43, align 4, !tbaa !9
  %.not95.not = icmp slt i64 %indvars.iv, %37
  br i1 %.not95.not, label %38, label %.loopexit, !llvm.loop !11

.loopexit:                                        ; preds = %38, %33, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  ret void
}

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

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

declare void @clarfg_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @clarf_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @Cf(ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCf(ptr noundef) local_unnamed_addr #4

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #5

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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 = { mustprogress 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"="64" "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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass