; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_ErrorHelper (getErrorDesc__)

; 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.string__ = type { ptr, i32 }
%struct.tag_____IntRange__ = type { i32, i32 }
%struct.tag_____LocationInfo__ = type { i32, %struct.tag_____IntRange__, %struct.tag_____IntRange__, %struct.string__ }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }

@mu_____string0 = external dso_local global %struct.string__, align 8
@mu_____string598 = external dso_local global %struct.string__, align 8
@mu_____string599 = external dso_local global %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local2 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local3 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local5 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local6 = external hidden unnamed_addr constant %struct.string__, align 8

; 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare dso_local void @StringBuilder__write__(ptr noundef, ptr, i32) #3

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @StringBuilder__compactToString__(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @string__equals__(ptr, i32, ptr, i32) #3

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @ErrorHelper__getErrorDesc__(ptr %0, i32 %1, ptr %2, i32 %3, i64 %4, ptr noundef byval(%struct.string__) align 8 %5) #3 {
  %7 = alloca %struct.string__, align 8
  %8 = alloca %struct.string__, align 8
  %9 = alloca %struct.string__, align 8
  %10 = alloca %struct.tag_____IntRange__, align 4
  %11 = alloca %struct.tag_____LocationInfo__, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.string__, align 8
  %14 = alloca i32, align 4
  %15 = alloca %struct.string__, align 8
  %16 = alloca %struct.string__, align 8
  %17 = alloca %struct.tag_____StringBuilder__, align 8
  %18 = alloca %struct.string__, align 8
  %19 = alloca %struct.string__, align 8
  %20 = alloca %struct.string__, align 8
  %21 = alloca %struct.string__, align 8
  %22 = alloca %struct.tag_____StringBuilder__, align 8
  %23 = alloca %struct.string__, align 8
  %24 = alloca %struct.string__, align 8
  %25 = alloca %struct.string__, align 8
  %26 = alloca %struct.string__, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %struct.string__, align 8
  %30 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 0
  store ptr %0, ptr %30, align 8
  %31 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 1
  store i32 %1, ptr %31, align 8
  %32 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  store ptr %2, ptr %32, align 8
  %33 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  store i32 %3, ptr %33, align 8
  store i64 %4, ptr %10, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #4
  %34 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8
  %36 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %37 = load i32, ptr %36, align 8
  %38 = load i64, ptr %10, align 4
  call void @ErrorHelper__spanToLocationInfo__(ptr dead_on_unwind writable sret(%struct.tag_____LocationInfo__) align 8 %11, ptr %35, i32 %37, i64 %38)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %39 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %11, i32 0, i32 3
  %40 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %11, i32 0, i32 2
  %41 = getelementptr inbounds %struct.tag_____IntRange__, ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds { ptr, i32 }, ptr %39, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8
  %45 = getelementptr inbounds { ptr, i32 }, ptr %39, i32 0, i32 1
  %46 = load i32, ptr %45, align 8
  %47 = call { ptr, i32 } @string__slice__(ptr %44, i32 %46, i32 noundef 0, i32 noundef %42)
  %48 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %49 = extractvalue { ptr, i32 } %47, 0
  store ptr %49, ptr %48, align 8
  %50 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %51 = extractvalue { ptr, i32 } %47, 1
  store i32 %51, ptr %50, align 8
  %52 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %55 = load i32, ptr %54, align 8
  %56 = call i32 @ErrorHelper__getNumColumns__(ptr %53, i32 %55, i32 noundef 4)
  store i32 %56, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %57 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %11, i32 0, i32 3
  %58 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %11, i32 0, i32 2
  %59 = getelementptr inbounds %struct.tag_____IntRange__, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %11, i32 0, i32 2
  %62 = getelementptr inbounds %struct.tag_____IntRange__, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !14
  %64 = getelementptr inbounds { ptr, i32 }, ptr %57, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8
  %66 = getelementptr inbounds { ptr, i32 }, ptr %57, i32 0, i32 1
  %67 = load i32, ptr %66, align 8
  %68 = call { ptr, i32 } @string__slice__(ptr %65, i32 %67, i32 noundef %60, i32 noundef %63)
  %69 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %70 = extractvalue { ptr, i32 } %68, 0
  store ptr %70, ptr %69, align 8
  %71 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %72 = extractvalue { ptr, i32 } %68, 1
  store i32 %72, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8
  %75 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %76 = load i32, ptr %75, align 8
  %77 = call i32 @ErrorHelper__getNumColumns__(ptr %74, i32 %76, i32 noundef 4)
  store i32 %77, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %78 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8
  %80 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 1
  %81 = load i32, ptr %80, align 8
  %82 = load ptr, ptr @mu_____string0, align 8
  %83 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string0, i32 0, i32 1), align 8
  %84 = call zeroext i8 @string__equals__(ptr %79, i32 %81, ptr %82, i32 %83)
  %85 = icmp ne i8 %84, 0
  br i1 %85, label %106, label %86

86:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 @__const.ErrorHelper__getErrorDesc__.local2, i64 16, i1 false)
  %87 = getelementptr inbounds { ptr, i32 }, ptr %18, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8
  %89 = getelementptr inbounds { ptr, i32 }, ptr %18, i32 0, i32 1
  %90 = load i32, ptr %89, align 8
  call void @StringBuilder__write__(ptr noundef %17, ptr %88, i32 %90)
  %91 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8
  %93 = getelementptr inbounds { ptr, i32 }, ptr %8, i32 0, i32 1
  %94 = load i32, ptr %93, align 8
  call void @StringBuilder__write__(ptr noundef %17, ptr %92, i32 %94)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 @__const.ErrorHelper__getErrorDesc__.local3, i64 16, i1 false)
  %95 = getelementptr inbounds { ptr, i32 }, ptr %19, i32 0, i32 0
  %96 = load ptr, ptr %95, align 8
  %97 = getelementptr inbounds { ptr, i32 }, ptr %19, i32 0, i32 1
  %98 = load i32, ptr %97, align 8
  call void @StringBuilder__write__(ptr noundef %17, ptr %96, i32 %98)
  %99 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %11, i32 0, i32 0
  %100 = load i32, ptr %99, align 8, !tbaa !15
  call void @int__writeTo__(i32 noundef %100, ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %101 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %17)
  %102 = getelementptr inbounds { ptr, i32 }, ptr %20, i32 0, i32 0
  %103 = extractvalue { ptr, i32 } %101, 0
  store ptr %103, ptr %102, align 8
  %104 = getelementptr inbounds { ptr, i32 }, ptr %20, i32 0, i32 1
  %105 = extractvalue { ptr, i32 } %101, 1
  store i32 %105, ptr %104, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  br label %107

106:                                              ; preds = %6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 @mu_____string0, i64 16, i1 false), !tbaa.struct !16
  br label %107

107:                                              ; preds = %106, %86
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #4
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 16, i1 false)
  %108 = getelementptr inbounds { ptr, i32 }, ptr %5, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8
  %110 = getelementptr inbounds { ptr, i32 }, ptr %5, i32 0, i32 1
  %111 = load i32, ptr %110, align 8
  call void @StringBuilder__write__(ptr noundef %22, ptr %109, i32 %111)
  %112 = getelementptr inbounds { ptr, i32 }, ptr %21, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8
  %114 = getelementptr inbounds { ptr, i32 }, ptr %21, i32 0, i32 1
  %115 = load i32, ptr %114, align 8
  call void @StringBuilder__write__(ptr noundef %22, ptr %113, i32 %115)
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 @__const.ErrorHelper__getErrorDesc__.local5, i64 16, i1 false)
  %116 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8
  %118 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 1
  %119 = load i32, ptr %118, align 8
  call void @StringBuilder__write__(ptr noundef %22, ptr %117, i32 %119)
  %120 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %11, i32 0, i32 3
  %121 = getelementptr inbounds { ptr, i32 }, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8
  %123 = getelementptr inbounds { ptr, i32 }, ptr %120, i32 0, i32 1
  %124 = load i32, ptr %123, align 8
  %125 = load ptr, ptr @mu_____string598, align 8
  %126 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string598, i32 0, i32 1), align 8
  %127 = load ptr, ptr @mu_____string599, align 8
  %128 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string599, i32 0, i32 1), align 8
  %129 = call { ptr, i32 } @string__replace__(ptr %122, i32 %124, ptr %125, i32 %126, ptr %127, i32 %128)
  %130 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 0
  %131 = extractvalue { ptr, i32 } %129, 0
  store ptr %131, ptr %130, align 8
  %132 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 1
  %133 = extractvalue { ptr, i32 } %129, 1
  store i32 %133, ptr %132, align 8
  %134 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 1
  %137 = load i32, ptr %136, align 8
  call void @StringBuilder__write__(ptr noundef %22, ptr %135, i32 %137)
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 @__const.ErrorHelper__getErrorDesc__.local6, i64 16, i1 false)
  %138 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8
  %140 = getelementptr inbounds { ptr, i32 }, ptr %25, i32 0, i32 1
  %141 = load i32, ptr %140, align 8
  call void @StringBuilder__write__(ptr noundef %22, ptr %139, i32 %141)
  %142 = load i32, ptr %12, align 4, !tbaa !13
  %143 = call { ptr, i32 } @string__repeatChar__(i8 noundef signext 32, i32 noundef %142)
  %144 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 0
  %145 = extractvalue { ptr, i32 } %143, 0
  store ptr %145, ptr %144, align 8
  %146 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 1
  %147 = extractvalue { ptr, i32 } %143, 1
  store i32 %147, ptr %146, align 8
  %148 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 0
  %149 = load ptr, ptr %148, align 8
  %150 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 1
  %151 = load i32, ptr %150, align 8
  call void @StringBuilder__write__(ptr noundef %22, ptr %149, i32 %151)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #4
  store i32 1, ptr %27, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #4
  %152 = load i32, ptr %14, align 4, !tbaa !13
  store i32 %152, ptr %28, align 4, !tbaa !13
  %153 = load i32, ptr %27, align 4, !tbaa !13
  %154 = load i32, ptr %28, align 4, !tbaa !13
  %155 = icmp sgt i32 %153, %154
  br i1 %155, label %156, label %158

156:                                              ; preds = %107
  %157 = load i32, ptr %27, align 4, !tbaa !13
  br label %160

158:                                              ; preds = %107
  %159 = load i32, ptr %28, align 4, !tbaa !13
  br label %160

160:                                              ; preds = %158, %156
  %161 = phi i32 [ %157, %156 ], [ %159, %158 ]
  %162 = call { ptr, i32 } @string__repeatChar__(i8 noundef signext 126, i32 noundef %161)
  %163 = getelementptr inbounds { ptr, i32 }, ptr %29, i32 0, i32 0
  %164 = extractvalue { ptr, i32 } %162, 0
  store ptr %164, ptr %163, align 8
  %165 = getelementptr inbounds { ptr, i32 }, ptr %29, i32 0, i32 1
  %166 = extractvalue { ptr, i32 } %162, 1
  store i32 %166, ptr %165, align 8
  %167 = getelementptr inbounds { ptr, i32 }, ptr %29, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8
  %169 = getelementptr inbounds { ptr, i32 }, ptr %29, i32 0, i32 1
  %170 = load i32, ptr %169, align 8
  call void @StringBuilder__write__(ptr noundef %22, ptr %168, i32 %170)
  %171 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %22)
  %172 = getelementptr inbounds { ptr, i32 }, ptr %7, i32 0, i32 0
  %173 = extractvalue { ptr, i32 } %171, 0
  store ptr %173, ptr %172, align 8
  %174 = getelementptr inbounds { ptr, i32 }, ptr %7, i32 0, i32 1
  %175 = extractvalue { ptr, i32 } %171, 1
  store i32 %175, ptr %174, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #4
  %176 = load { ptr, i32 }, ptr %7, align 8
  ret { ptr, i32 } %176
}

; Function Attrs: nounwind uwtable
declare dso_local void @int__writeTo__(i32 noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @string__slice__(ptr, i32, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @string__replace__(ptr, i32, ptr, i32, ptr, i32) #3

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @string__repeatChar__(i8 noundef signext, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @ErrorHelper__spanToLocationInfo__(ptr dead_on_unwind noalias writable sret(%struct.tag_____LocationInfo__) align 8, ptr, i32, i64) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @ErrorHelper__getNumColumns__(ptr, i32, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 12}
!6 = !{!"tag_____LocationInfo__", !7, i64 0, !10, i64 4, !10, i64 12, !11, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"tag_____IntRange__", !7, i64 0, !7, i64 4}
!11 = !{!"", !12, i64 0, !7, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!6, !7, i64 16}
!15 = !{!6, !7, i64 0}
!16 = !{i64 0, i64 8, !17, i64 8, i64 4, !13}
!17 = !{!12, !12, 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"

%struct.string__ = type { ptr, i32 }
%struct.tag_____LocationInfo__ = type { i32, %struct.tag_____IntRange__, %struct.tag_____IntRange__, %struct.string__ }
%struct.tag_____IntRange__ = type { i32, i32 }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }

@mu_____string0 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string598 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string599 = external dso_local local_unnamed_addr global %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local2 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local3 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local5 = external hidden unnamed_addr constant %struct.string__, align 8
@__const.ErrorHelper__getErrorDesc__.local6 = external hidden unnamed_addr constant %struct.string__, align 8

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @StringBuilder__write__(ptr noundef, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @StringBuilder__compactToString__(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @string__equals__(ptr, i32, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @ErrorHelper__getErrorDesc__(ptr %0, i32 %1, ptr %2, i32 %3, i64 %4, ptr nocapture noundef readonly byval(%struct.string__) align 8 %5) local_unnamed_addr #2 {
  %7 = alloca %struct.tag_____LocationInfo__, align 8
  %8 = alloca %struct.tag_____StringBuilder__, align 8
  %9 = alloca %struct.tag_____StringBuilder__, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  call void @ErrorHelper__spanToLocationInfo__(ptr dead_on_unwind nonnull writable sret(%struct.tag_____LocationInfo__) align 8 %7, ptr %2, i32 %3, i64 %4)
  %10 = getelementptr inbounds i8, ptr %7, i64 24
  %11 = getelementptr inbounds i8, ptr %7, i64 12
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = load ptr, ptr %10, align 8
  %14 = getelementptr inbounds i8, ptr %7, i64 32
  %15 = load i32, ptr %14, align 8
  %16 = call { ptr, i32 } @string__slice__(ptr %13, i32 %15, i32 noundef 0, i32 noundef %12)
  %17 = extractvalue { ptr, i32 } %16, 0
  %18 = extractvalue { ptr, i32 } %16, 1
  %19 = call i32 @ErrorHelper__getNumColumns__(ptr %17, i32 %18, i32 noundef 4)
  %20 = load i32, ptr %11, align 4, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %7, i64 16
  %22 = load i32, ptr %21, align 8, !tbaa !13
  %23 = load ptr, ptr %10, align 8
  %24 = load i32, ptr %14, align 8
  %25 = call { ptr, i32 } @string__slice__(ptr %23, i32 %24, i32 noundef %20, i32 noundef %22)
  %26 = extractvalue { ptr, i32 } %25, 0
  %27 = extractvalue { ptr, i32 } %25, 1
  %28 = call i32 @ErrorHelper__getNumColumns__(ptr %26, i32 %27, i32 noundef 4)
  %29 = load ptr, ptr @mu_____string0, align 8
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string0, i64 8), align 8
  %31 = call zeroext i8 @string__equals__(ptr %0, i32 %1, ptr %29, i32 %30)
  %.not = icmp eq i8 %31, 0
  br i1 %.not, label %32, label %37

32:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  %.sroa.021.0.copyload = load ptr, ptr @__const.ErrorHelper__getErrorDesc__.local2, align 8
  %.sroa.422.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.ErrorHelper__getErrorDesc__.local2, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %8, ptr %.sroa.021.0.copyload, i32 %.sroa.422.0.copyload)
  call void @StringBuilder__write__(ptr noundef nonnull %8, ptr %0, i32 %1)
  %.sroa.018.0.copyload = load ptr, ptr @__const.ErrorHelper__getErrorDesc__.local3, align 8
  %.sroa.419.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.ErrorHelper__getErrorDesc__.local3, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %8, ptr %.sroa.018.0.copyload, i32 %.sroa.419.0.copyload)
  %33 = load i32, ptr %7, align 8, !tbaa !14
  call void @int__writeTo__(i32 noundef %33, ptr noundef nonnull %8)
  %34 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %8)
  %35 = extractvalue { ptr, i32 } %34, 0
  %36 = extractvalue { ptr, i32 } %34, 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  br label %38

37:                                               ; preds = %6
  %.sroa.024.0.copyload = load ptr, ptr @mu_____string0, align 8, !tbaa !15
  %.sroa.525.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string0, i64 8), align 8, !tbaa !16
  br label %38

38:                                               ; preds = %37, %32
  %.sroa.024.0 = phi ptr [ %.sroa.024.0.copyload, %37 ], [ %35, %32 ]
  %.sroa.525.0 = phi i32 [ %.sroa.525.0.copyload, %37 ], [ %36, %32 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %9, i8 0, i64 16, i1 false)
  %39 = load ptr, ptr %5, align 8
  %40 = getelementptr inbounds i8, ptr %5, i64 8
  %41 = load i32, ptr %40, align 8
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %39, i32 %41)
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %.sroa.024.0, i32 %.sroa.525.0)
  %.sroa.09.0.copyload = load ptr, ptr @__const.ErrorHelper__getErrorDesc__.local5, align 8
  %.sroa.410.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.ErrorHelper__getErrorDesc__.local5, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %.sroa.09.0.copyload, i32 %.sroa.410.0.copyload)
  %42 = load ptr, ptr %10, align 8
  %43 = load i32, ptr %14, align 8
  %44 = load ptr, ptr @mu_____string598, align 8
  %45 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string598, i64 8), align 8
  %46 = load ptr, ptr @mu_____string599, align 8
  %47 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string599, i64 8), align 8
  %48 = call { ptr, i32 } @string__replace__(ptr %42, i32 %43, ptr %44, i32 %45, ptr %46, i32 %47)
  %49 = extractvalue { ptr, i32 } %48, 0
  %50 = extractvalue { ptr, i32 } %48, 1
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %49, i32 %50)
  %.sroa.06.0.copyload = load ptr, ptr @__const.ErrorHelper__getErrorDesc__.local6, align 8
  %.sroa.4.0.copyload = load i32, ptr getelementptr inbounds (i8, ptr @__const.ErrorHelper__getErrorDesc__.local6, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %.sroa.06.0.copyload, i32 %.sroa.4.0.copyload)
  %51 = call { ptr, i32 } @string__repeatChar__(i8 noundef signext 32, i32 noundef %19)
  %52 = extractvalue { ptr, i32 } %51, 0
  %53 = extractvalue { ptr, i32 } %51, 1
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %52, i32 %53)
  %54 = call i32 @llvm.smax.i32(i32 %28, i32 1)
  %55 = call { ptr, i32 } @string__repeatChar__(i8 noundef signext 126, i32 noundef %54)
  %56 = extractvalue { ptr, i32 } %55, 0
  %57 = extractvalue { ptr, i32 } %55, 1
  call void @StringBuilder__write__(ptr noundef nonnull %9, ptr %56, i32 %57)
  %58 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %9)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  ret { ptr, i32 } %58
}

; Function Attrs: nounwind uwtable
declare dso_local void @int__writeTo__(i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @string__slice__(ptr, i32, i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @string__replace__(ptr, i32, ptr, i32, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @string__repeatChar__(i8 noundef signext, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @ErrorHelper__spanToLocationInfo__(ptr dead_on_unwind noalias writable sret(%struct.tag_____LocationInfo__) align 8, ptr, i32, i64) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @ErrorHelper__getNumColumns__(ptr, i32, i32 noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 = { 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, !7, i64 12}
!6 = !{!"tag_____LocationInfo__", !7, i64 0, !10, i64 4, !10, i64 12, !11, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"tag_____IntRange__", !7, i64 0, !7, i64 4}
!11 = !{!"", !12, i64 0, !7, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass