; LLVM IR from niuyishuai/PDCABB :: LAPACK_BLAS/LAPACK (cptsvx)

; 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 [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@c__1 = external hidden global i64, align 8
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @cptsvx_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16) #0 {
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, 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 ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca i64, align 8
  %37 = alloca i64, align 8
  %38 = alloca i64, align 8
  %39 = alloca i64, align 8
  %40 = alloca i64, align 8
  %41 = alloca float, align 4
  %42 = alloca i64, align 8
  %43 = alloca i32, align 4
  store ptr %0, ptr %19, align 8, !tbaa !5
  store ptr %1, ptr %20, align 8, !tbaa !5
  store ptr %2, ptr %21, align 8, !tbaa !5
  store ptr %3, ptr %22, align 8, !tbaa !5
  store ptr %4, ptr %23, align 8, !tbaa !5
  store ptr %5, ptr %24, align 8, !tbaa !5
  store ptr %6, ptr %25, align 8, !tbaa !5
  store ptr %7, ptr %26, align 8, !tbaa !5
  store ptr %8, ptr %27, align 8, !tbaa !5
  store ptr %9, ptr %28, align 8, !tbaa !5
  store ptr %10, ptr %29, align 8, !tbaa !5
  store ptr %11, ptr %30, align 8, !tbaa !5
  store ptr %12, ptr %31, align 8, !tbaa !5
  store ptr %13, ptr %32, align 8, !tbaa !5
  store ptr %14, ptr %33, align 8, !tbaa !5
  store ptr %15, ptr %34, align 8, !tbaa !5
  store ptr %16, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %40) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #3
  %44 = load ptr, ptr %22, align 8, !tbaa !5
  %45 = getelementptr inbounds float, ptr %44, i32 -1
  store ptr %45, ptr %22, align 8, !tbaa !5
  %46 = load ptr, ptr %23, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.complex, ptr %46, i32 -1
  store ptr %47, ptr %23, align 8, !tbaa !5
  %48 = load ptr, ptr %24, align 8, !tbaa !5
  %49 = getelementptr inbounds float, ptr %48, i32 -1
  store ptr %49, ptr %24, align 8, !tbaa !5
  %50 = load ptr, ptr %25, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.complex, ptr %50, i32 -1
  store ptr %51, ptr %25, align 8, !tbaa !5
  %52 = load ptr, ptr %27, align 8, !tbaa !5
  %53 = load i64, ptr %52, align 8, !tbaa !9
  store i64 %53, ptr %36, align 8, !tbaa !9
  %54 = load i64, ptr %36, align 8, !tbaa !9
  %55 = add nsw i64 1, %54
  store i64 %55, ptr %37, align 8, !tbaa !9
  %56 = load i64, ptr %37, align 8, !tbaa !9
  %57 = load ptr, ptr %26, align 8, !tbaa !5
  %58 = sub i64 0, %56
  %59 = getelementptr inbounds %struct.complex, ptr %57, i64 %58
  store ptr %59, ptr %26, align 8, !tbaa !5
  %60 = load ptr, ptr %29, align 8, !tbaa !5
  %61 = load i64, ptr %60, align 8, !tbaa !9
  store i64 %61, ptr %38, align 8, !tbaa !9
  %62 = load i64, ptr %38, align 8, !tbaa !9
  %63 = add nsw i64 1, %62
  store i64 %63, ptr %39, align 8, !tbaa !9
  %64 = load i64, ptr %39, align 8, !tbaa !9
  %65 = load ptr, ptr %28, align 8, !tbaa !5
  %66 = sub i64 0, %64
  %67 = getelementptr inbounds %struct.complex, ptr %65, i64 %66
  store ptr %67, ptr %28, align 8, !tbaa !5
  %68 = load ptr, ptr %31, align 8, !tbaa !5
  %69 = getelementptr inbounds float, ptr %68, i32 -1
  store ptr %69, ptr %31, align 8, !tbaa !5
  %70 = load ptr, ptr %32, align 8, !tbaa !5
  %71 = getelementptr inbounds float, ptr %70, i32 -1
  store ptr %71, ptr %32, align 8, !tbaa !5
  %72 = load ptr, ptr %33, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.complex, ptr %72, i32 -1
  store ptr %73, ptr %33, align 8, !tbaa !5
  %74 = load ptr, ptr %34, align 8, !tbaa !5
  %75 = getelementptr inbounds float, ptr %74, i32 -1
  store ptr %75, ptr %34, align 8, !tbaa !5
  %76 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 0, ptr %76, align 8, !tbaa !9
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = call i64 @lsame_(ptr noundef %77, ptr noundef @.str)
  store i64 %78, ptr %42, align 8, !tbaa !9
  %79 = load i64, ptr %42, align 8, !tbaa !9
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %87, label %81

81:                                               ; preds = %17
  %82 = load ptr, ptr %19, align 8, !tbaa !5
  %83 = call i64 @lsame_(ptr noundef %82, ptr noundef @.str.1)
  %84 = icmp ne i64 %83, 0
  br i1 %84, label %87, label %85

85:                                               ; preds = %81
  %86 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 -1, ptr %86, align 8, !tbaa !9
  br label %133

87:                                               ; preds = %81, %17
  %88 = load ptr, ptr %20, align 8, !tbaa !5
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = icmp slt i64 %89, 0
  br i1 %90, label %91, label %93

91:                                               ; preds = %87
  %92 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 -2, ptr %92, align 8, !tbaa !9
  br label %132

93:                                               ; preds = %87
  %94 = load ptr, ptr %21, align 8, !tbaa !5
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = icmp slt i64 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %93
  %98 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 -3, ptr %98, align 8, !tbaa !9
  br label %131

99:                                               ; preds = %93
  %100 = load ptr, ptr %27, align 8, !tbaa !5
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = load ptr, ptr %20, align 8, !tbaa !5
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = icmp sge i64 1, %103
  br i1 %104, label %105, label %106

105:                                              ; preds = %99
  br label %109

106:                                              ; preds = %99
  %107 = load ptr, ptr %20, align 8, !tbaa !5
  %108 = load i64, ptr %107, align 8, !tbaa !9
  br label %109

109:                                              ; preds = %106, %105
  %110 = phi i64 [ 1, %105 ], [ %108, %106 ]
  %111 = icmp slt i64 %101, %110
  br i1 %111, label %112, label %114

112:                                              ; preds = %109
  %113 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 -9, ptr %113, align 8, !tbaa !9
  br label %130

114:                                              ; preds = %109
  %115 = load ptr, ptr %29, align 8, !tbaa !5
  %116 = load i64, ptr %115, align 8, !tbaa !9
  %117 = load ptr, ptr %20, align 8, !tbaa !5
  %118 = load i64, ptr %117, align 8, !tbaa !9
  %119 = icmp sge i64 1, %118
  br i1 %119, label %120, label %121

120:                                              ; preds = %114
  br label %124

121:                                              ; preds = %114
  %122 = load ptr, ptr %20, align 8, !tbaa !5
  %123 = load i64, ptr %122, align 8, !tbaa !9
  br label %124

124:                                              ; preds = %121, %120
  %125 = phi i64 [ 1, %120 ], [ %123, %121 ]
  %126 = icmp slt i64 %116, %125
  br i1 %126, label %127, label %129

127:                                              ; preds = %124
  %128 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 -11, ptr %128, align 8, !tbaa !9
  br label %129

129:                                              ; preds = %127, %124
  br label %130

130:                                              ; preds = %129, %112
  br label %131

131:                                              ; preds = %130, %97
  br label %132

132:                                              ; preds = %131, %91
  br label %133

133:                                              ; preds = %132, %85
  %134 = load ptr, ptr %35, align 8, !tbaa !5
  %135 = load i64, ptr %134, align 8, !tbaa !9
  %136 = icmp ne i64 %135, 0
  br i1 %136, label %137, label %142

137:                                              ; preds = %133
  %138 = load ptr, ptr %35, align 8, !tbaa !5
  %139 = load i64, ptr %138, align 8, !tbaa !9
  %140 = sub nsw i64 0, %139
  store i64 %140, ptr %40, align 8, !tbaa !9
  %141 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %40)
  store i32 0, ptr %18, align 4
  store i32 1, ptr %43, align 4
  br label %258

142:                                              ; preds = %133
  %143 = load i64, ptr %42, align 8, !tbaa !9
  %144 = icmp ne i64 %143, 0
  br i1 %144, label %145, label %178

145:                                              ; preds = %142
  %146 = load ptr, ptr %20, align 8, !tbaa !5
  %147 = load ptr, ptr %22, align 8, !tbaa !5
  %148 = getelementptr inbounds float, ptr %147, i64 1
  %149 = load ptr, ptr %24, align 8, !tbaa !5
  %150 = getelementptr inbounds float, ptr %149, i64 1
  %151 = call i32 @f2c_scopy(ptr noundef %146, ptr noundef %148, ptr noundef @c__1, ptr noundef %150, ptr noundef @c__1)
  %152 = load ptr, ptr %20, align 8, !tbaa !5
  %153 = load i64, ptr %152, align 8, !tbaa !9
  %154 = icmp sgt i64 %153, 1
  br i1 %154, label %155, label %164

155:                                              ; preds = %145
  %156 = load ptr, ptr %20, align 8, !tbaa !5
  %157 = load i64, ptr %156, align 8, !tbaa !9
  %158 = sub nsw i64 %157, 1
  store i64 %158, ptr %40, align 8, !tbaa !9
  %159 = load ptr, ptr %23, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.complex, ptr %159, i64 1
  %161 = load ptr, ptr %25, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.complex, ptr %161, i64 1
  %163 = call i32 @f2c_ccopy(ptr noundef %40, ptr noundef %160, ptr noundef @c__1, ptr noundef %162, ptr noundef @c__1)
  br label %164

164:                                              ; preds = %155, %145
  %165 = load ptr, ptr %20, align 8, !tbaa !5
  %166 = load ptr, ptr %24, align 8, !tbaa !5
  %167 = getelementptr inbounds float, ptr %166, i64 1
  %168 = load ptr, ptr %25, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.complex, ptr %168, i64 1
  %170 = load ptr, ptr %35, align 8, !tbaa !5
  %171 = call i32 @cpttrf_(ptr noundef %165, ptr noundef %167, ptr noundef %169, ptr noundef %170)
  %172 = load ptr, ptr %35, align 8, !tbaa !5
  %173 = load i64, ptr %172, align 8, !tbaa !9
  %174 = icmp sgt i64 %173, 0
  br i1 %174, label %175, label %177

175:                                              ; preds = %164
  %176 = load ptr, ptr %30, align 8, !tbaa !5
  store float 0.000000e+00, ptr %176, align 4, !tbaa !11
  store i32 0, ptr %18, align 4
  store i32 1, ptr %43, align 4
  br label %258

177:                                              ; preds = %164
  br label %178

178:                                              ; preds = %177, %142
  %179 = load ptr, ptr %20, align 8, !tbaa !5
  %180 = load ptr, ptr %22, align 8, !tbaa !5
  %181 = getelementptr inbounds float, ptr %180, i64 1
  %182 = load ptr, ptr %23, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.complex, ptr %182, i64 1
  %184 = call double @clanht_(ptr noundef @.str.3, ptr noundef %179, ptr noundef %181, ptr noundef %183)
  %185 = fptrunc double %184 to float
  store float %185, ptr %41, align 4, !tbaa !11
  %186 = load ptr, ptr %20, align 8, !tbaa !5
  %187 = load ptr, ptr %24, align 8, !tbaa !5
  %188 = getelementptr inbounds float, ptr %187, i64 1
  %189 = load ptr, ptr %25, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.complex, ptr %189, i64 1
  %191 = load ptr, ptr %30, align 8, !tbaa !5
  %192 = load ptr, ptr %34, align 8, !tbaa !5
  %193 = getelementptr inbounds float, ptr %192, i64 1
  %194 = load ptr, ptr %35, align 8, !tbaa !5
  %195 = call i32 @cptcon_(ptr noundef %186, ptr noundef %188, ptr noundef %190, ptr noundef %41, ptr noundef %191, ptr noundef %193, ptr noundef %194)
  %196 = load ptr, ptr %20, align 8, !tbaa !5
  %197 = load ptr, ptr %21, align 8, !tbaa !5
  %198 = load ptr, ptr %26, align 8, !tbaa !5
  %199 = load i64, ptr %37, align 8, !tbaa !9
  %200 = getelementptr inbounds %struct.complex, ptr %198, i64 %199
  %201 = load ptr, ptr %27, align 8, !tbaa !5
  %202 = load ptr, ptr %28, align 8, !tbaa !5
  %203 = load i64, ptr %39, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.complex, ptr %202, i64 %203
  %205 = load ptr, ptr %29, align 8, !tbaa !5
  %206 = call i32 @clacpy_(ptr noundef @.str.4, ptr noundef %196, ptr noundef %197, ptr noundef %200, ptr noundef %201, ptr noundef %204, ptr noundef %205)
  %207 = load ptr, ptr %20, align 8, !tbaa !5
  %208 = load ptr, ptr %21, align 8, !tbaa !5
  %209 = load ptr, ptr %24, align 8, !tbaa !5
  %210 = getelementptr inbounds float, ptr %209, i64 1
  %211 = load ptr, ptr %25, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.complex, ptr %211, i64 1
  %213 = load ptr, ptr %28, align 8, !tbaa !5
  %214 = load i64, ptr %39, align 8, !tbaa !9
  %215 = getelementptr inbounds %struct.complex, ptr %213, i64 %214
  %216 = load ptr, ptr %29, align 8, !tbaa !5
  %217 = load ptr, ptr %35, align 8, !tbaa !5
  %218 = call i32 @cpttrs_(ptr noundef @.str.5, ptr noundef %207, ptr noundef %208, ptr noundef %210, ptr noundef %212, ptr noundef %215, ptr noundef %216, ptr noundef %217)
  %219 = load ptr, ptr %20, align 8, !tbaa !5
  %220 = load ptr, ptr %21, align 8, !tbaa !5
  %221 = load ptr, ptr %22, align 8, !tbaa !5
  %222 = getelementptr inbounds float, ptr %221, i64 1
  %223 = load ptr, ptr %23, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.complex, ptr %223, i64 1
  %225 = load ptr, ptr %24, align 8, !tbaa !5
  %226 = getelementptr inbounds float, ptr %225, i64 1
  %227 = load ptr, ptr %25, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.complex, ptr %227, i64 1
  %229 = load ptr, ptr %26, align 8, !tbaa !5
  %230 = load i64, ptr %37, align 8, !tbaa !9
  %231 = getelementptr inbounds %struct.complex, ptr %229, i64 %230
  %232 = load ptr, ptr %27, align 8, !tbaa !5
  %233 = load ptr, ptr %28, align 8, !tbaa !5
  %234 = load i64, ptr %39, align 8, !tbaa !9
  %235 = getelementptr inbounds %struct.complex, ptr %233, i64 %234
  %236 = load ptr, ptr %29, align 8, !tbaa !5
  %237 = load ptr, ptr %31, align 8, !tbaa !5
  %238 = getelementptr inbounds float, ptr %237, i64 1
  %239 = load ptr, ptr %32, align 8, !tbaa !5
  %240 = getelementptr inbounds float, ptr %239, i64 1
  %241 = load ptr, ptr %33, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.complex, ptr %241, i64 1
  %243 = load ptr, ptr %34, align 8, !tbaa !5
  %244 = getelementptr inbounds float, ptr %243, i64 1
  %245 = load ptr, ptr %35, align 8, !tbaa !5
  %246 = call i32 @cptrfs_(ptr noundef @.str.5, ptr noundef %219, ptr noundef %220, ptr noundef %222, ptr noundef %224, ptr noundef %226, ptr noundef %228, ptr noundef %231, ptr noundef %232, ptr noundef %235, ptr noundef %236, ptr noundef %238, ptr noundef %240, ptr noundef %242, ptr noundef %244, ptr noundef %245)
  %247 = load ptr, ptr %30, align 8, !tbaa !5
  %248 = load float, ptr %247, align 4, !tbaa !11
  %249 = fpext float %248 to double
  %250 = call double @slamch_(ptr noundef @.str.6)
  %251 = fcmp olt double %249, %250
  br i1 %251, label %252, label %257

252:                                              ; preds = %178
  %253 = load ptr, ptr %20, align 8, !tbaa !5
  %254 = load i64, ptr %253, align 8, !tbaa !9
  %255 = add nsw i64 %254, 1
  %256 = load ptr, ptr %35, align 8, !tbaa !5
  store i64 %255, ptr %256, align 8, !tbaa !9
  br label %257

257:                                              ; preds = %252, %178
  store i32 0, ptr %18, align 4
  store i32 1, ptr %43, align 4
  br label %258

258:                                              ; preds = %257, %175, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %40) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  %259 = load i32, ptr %18, align 4
  ret i32 %259
}

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

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

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

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

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

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

declare double @clanht_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

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

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

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

declare double @slamch_(ptr noundef) #2

; 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 = { 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, !12, i64 0}
!12 = !{!"float", !7, i64 0}


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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @cptsvx_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16) local_unnamed_addr #0 {
  %18 = alloca i64, align 8
  %19 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #4
  store i64 0, ptr %16, align 8, !tbaa !5
  %20 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #4
  %.not = icmp eq i64 %20, 0
  br i1 %.not, label %21, label %23

21:                                               ; preds = %17
  %22 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #4
  %.not97 = icmp eq i64 %22, 0
  br i1 %.not97, label %.thread.sink.split, label %23

23:                                               ; preds = %21, %17
  %24 = load i64, ptr %1, align 8, !tbaa !5
  %25 = icmp slt i64 %24, 0
  br i1 %25, label %.thread.sink.split, label %26

26:                                               ; preds = %23
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %28 = icmp slt i64 %27, 0
  br i1 %28, label %.thread.sink.split, label %29

29:                                               ; preds = %26
  %30 = load i64, ptr %8, align 8, !tbaa !5
  %spec.select = tail call i64 @llvm.umax.i64(i64 %24, i64 1)
  %31 = icmp slt i64 %30, %spec.select
  br i1 %31, label %.thread.sink.split, label %32

32:                                               ; preds = %29
  %33 = load i64, ptr %10, align 8, !tbaa !5
  %34 = icmp slt i64 %33, %spec.select
  br i1 %34, label %.thread.sink.split, label %35

35:                                               ; preds = %32
  %.pr = load i64, ptr %16, align 8, !tbaa !5
  %.not98 = icmp eq i64 %.pr, 0
  br i1 %.not98, label %39, label %.thread

.thread.sink.split:                               ; preds = %32, %29, %26, %23, %21
  %.sink = phi i64 [ -1, %21 ], [ -2, %23 ], [ -3, %26 ], [ -9, %29 ], [ -11, %32 ]
  store i64 %.sink, ptr %16, align 8, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %35
  %36 = phi i64 [ %.pr, %35 ], [ %.sink, %.thread.sink.split ]
  %37 = sub nsw i64 0, %36
  store i64 %37, ptr %18, align 8, !tbaa !5
  %38 = call i32 @xerbla_(ptr noundef nonnull @.str.2, ptr noundef nonnull %18) #4
  br label %66

39:                                               ; preds = %35
  br i1 %.not, label %52, label %40

40:                                               ; preds = %39
  %41 = tail call i32 @f2c_scopy(ptr noundef nonnull %1, ptr noundef %3, ptr noundef nonnull @c__1, ptr noundef %5, ptr noundef nonnull @c__1) #4
  %42 = load i64, ptr %1, align 8, !tbaa !5
  %43 = icmp sgt i64 %42, 1
  br i1 %43, label %44, label %47

44:                                               ; preds = %40
  %45 = add nsw i64 %42, -1
  store i64 %45, ptr %18, align 8, !tbaa !5
  %46 = call i32 @f2c_ccopy(ptr noundef nonnull %18, ptr noundef %4, ptr noundef nonnull @c__1, ptr noundef %6, ptr noundef nonnull @c__1) #4
  br label %47

47:                                               ; preds = %44, %40
  %48 = call i32 @cpttrf_(ptr noundef nonnull %1, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %16) #4
  %49 = load i64, ptr %16, align 8, !tbaa !5
  %50 = icmp sgt i64 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %47
  store float 0.000000e+00, ptr %11, align 4, !tbaa !9
  br label %66

52:                                               ; preds = %47, %39
  %53 = call double @clanht_(ptr noundef nonnull @.str.3, ptr noundef nonnull %1, ptr noundef %3, ptr noundef %4) #4
  %54 = fptrunc double %53 to float
  store float %54, ptr %19, align 4, !tbaa !9
  %55 = call i32 @cptcon_(ptr noundef nonnull %1, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %19, ptr noundef %11, ptr noundef %15, ptr noundef nonnull %16) #4
  %56 = call i32 @clacpy_(ptr noundef nonnull @.str.4, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %7, ptr noundef nonnull %8, ptr noundef %9, ptr noundef nonnull %10) #4
  %57 = call i32 @cpttrs_(ptr noundef nonnull @.str.5, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %5, ptr noundef %6, ptr noundef %9, ptr noundef nonnull %10, ptr noundef nonnull %16) #4
  %58 = call i32 @cptrfs_(ptr noundef nonnull @.str.5, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %8, ptr noundef %9, ptr noundef nonnull %10, ptr noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef nonnull %16) #4
  %59 = load float, ptr %11, align 4, !tbaa !9
  %60 = fpext float %59 to double
  %61 = call double @slamch_(ptr noundef nonnull @.str.6) #4
  %62 = fcmp ogt double %61, %60
  br i1 %62, label %63, label %66

63:                                               ; preds = %52
  %64 = load i64, ptr %1, align 8, !tbaa !5
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %16, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %52, %63, %51, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #4
  ret i32 0
}

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

declare i64 @lsame_(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

declare double @clanht_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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

declare double @slamch_(ptr noundef) local_unnamed_addr #2

; 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 i64 @llvm.umax.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 = { 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 = { 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, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass