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

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

@top_____abandonFn__ = external dso_local thread_local global ptr, 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1

; 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) #2

; 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) #3

; Function Attrs: nounwind uwtable
declare dso_local i64 @IntRange__cons__(i32 noundef, i32 noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local void @ErrorHelper__spanToLocationInfo__(ptr dead_on_unwind noalias writable sret(%struct.tag_____LocationInfo__) align 8 %0, ptr %1, i32 %2, i64 %3) #4 {
  %5 = alloca %struct.string__, align 8
  %6 = alloca %struct.tag_____IntRange__, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.tag_____IntRange__, align 4
  %25 = alloca %struct.tag_____IntRange__, align 4
  %26 = alloca %struct.string__, align 8
  %27 = getelementptr inbounds { ptr, i32 }, ptr %5, i32 0, i32 0
  store ptr %1, ptr %27, align 8
  %28 = getelementptr inbounds { ptr, i32 }, ptr %5, i32 0, i32 1
  store i32 %2, ptr %28, align 8
  store i64 %3, ptr %6, align 4
  %29 = getelementptr inbounds %struct.tag_____IntRange__, ptr %6, i32 0, i32 0
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = getelementptr inbounds %struct.tag_____IntRange__, ptr %6, i32 0, i32 1
  %32 = load i32, ptr %31, align 4, !tbaa !10
  %33 = icmp sle i32 %30, %32
  br i1 %33, label %37, label %34

34:                                               ; preds = %4
  %35 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  call void %36(i32 noundef -2)
  br label %37

37:                                               ; preds = %34, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %38 = getelementptr inbounds %struct.tag_____IntRange__, ptr %6, i32 0, i32 0
  %39 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %39, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %40

40:                                               ; preds = %72, %37
  br label %41

41:                                               ; preds = %40
  %42 = load i32, ptr %10, align 4, !tbaa !13
  %43 = load i32, ptr %7, align 4, !tbaa !13
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  br label %75

46:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr %5, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %47 = load i32, ptr %10, align 4, !tbaa !13
  store i32 %47, ptr %12, align 4, !tbaa !13
  %48 = load i32, ptr %12, align 4, !tbaa !13
  %49 = load ptr, ptr %11, align 8, !tbaa !11
  %50 = getelementptr inbounds %struct.string__, ptr %49, i32 0, i32 1
  %51 = load i32, ptr %50, align 8, !tbaa !14
  %52 = icmp ult i32 %48, %51
  br i1 %52, label %56, label %53

53:                                               ; preds = %46
  %54 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %55 = load ptr, ptr %54, align 8, !tbaa !11
  call void %55(i32 noundef -3)
  br label %56

56:                                               ; preds = %53, %46
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  %57 = load ptr, ptr %11, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.string__, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !16
  %60 = load i32, ptr %12, align 4, !tbaa !13
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds i8, ptr %59, i64 %61
  %63 = load i8, ptr %62, align 1, !tbaa !17
  store i8 %63, ptr %13, align 1, !tbaa !17
  %64 = load i8, ptr %13, align 1, !tbaa !17
  %65 = sext i8 %64 to i32
  %66 = icmp eq i32 %65, 10
  br i1 %66, label %67, label %72

67:                                               ; preds = %56
  %68 = load i32, ptr %8, align 4, !tbaa !13
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %8, align 4, !tbaa !13
  %70 = load i32, ptr %10, align 4, !tbaa !13
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %9, align 4, !tbaa !13
  br label %72

72:                                               ; preds = %67, %56
  %73 = load i32, ptr %10, align 4, !tbaa !13
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %40

75:                                               ; preds = %45
  %76 = load i32, ptr %7, align 4, !tbaa !13
  store i32 %76, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !13
  br label %77

77:                                               ; preds = %129, %75
  br label %78

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store ptr %5, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %79 = load i32, ptr %10, align 4, !tbaa !13
  store i32 %79, ptr %16, align 4, !tbaa !13
  %80 = load i32, ptr %16, align 4, !tbaa !13
  %81 = load ptr, ptr %15, align 8, !tbaa !11
  %82 = getelementptr inbounds %struct.string__, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 8, !tbaa !14
  %84 = icmp ult i32 %80, %83
  br i1 %84, label %88, label %85

85:                                               ; preds = %78
  %86 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %87 = load ptr, ptr %86, align 8, !tbaa !11
  call void %87(i32 noundef -3)
  br label %88

88:                                               ; preds = %85, %78
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  %89 = load ptr, ptr %15, align 8, !tbaa !11
  %90 = getelementptr inbounds %struct.string__, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !16
  %92 = load i32, ptr %16, align 4, !tbaa !13
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %91, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !17
  store i8 %95, ptr %17, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  %96 = load i8, ptr %17, align 1, !tbaa !17
  %97 = sext i8 %96 to i32
  %98 = icmp eq i32 %97, 10
  %99 = zext i1 %98 to i32
  %100 = trunc i32 %99 to i8
  store i8 %100, ptr %18, align 1, !tbaa !17
  %101 = load i8, ptr %18, align 1, !tbaa !17
  %102 = icmp ne i8 %101, 0
  br i1 %102, label %109, label %103

103:                                              ; preds = %88
  %104 = load i8, ptr %17, align 1, !tbaa !17
  %105 = sext i8 %104 to i32
  %106 = icmp eq i32 %105, 13
  %107 = zext i1 %106 to i32
  %108 = trunc i32 %107 to i8
  store i8 %108, ptr %18, align 1, !tbaa !17
  br label %109

109:                                              ; preds = %103, %88
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  %110 = load i8, ptr %18, align 1, !tbaa !17
  store i8 %110, ptr %19, align 1, !tbaa !17
  %111 = load i8, ptr %19, align 1, !tbaa !17
  %112 = icmp ne i8 %111, 0
  br i1 %112, label %119, label %113

113:                                              ; preds = %109
  %114 = load i8, ptr %17, align 1, !tbaa !17
  %115 = sext i8 %114 to i32
  %116 = icmp eq i32 %115, 0
  %117 = zext i1 %116 to i32
  %118 = trunc i32 %117 to i8
  store i8 %118, ptr %19, align 1, !tbaa !17
  br label %119

119:                                              ; preds = %113, %109
  %120 = load i8, ptr %19, align 1, !tbaa !17
  %121 = icmp ne i8 %120, 0
  br i1 %121, label %122, label %124

122:                                              ; preds = %119
  %123 = load i32, ptr %10, align 4, !tbaa !13
  store i32 %123, ptr %14, align 4, !tbaa !13
  store i32 6, ptr %20, align 4
  br label %127

124:                                              ; preds = %119
  %125 = load i32, ptr %10, align 4, !tbaa !13
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %10, align 4, !tbaa !13
  store i32 0, ptr %20, align 4
  br label %127

127:                                              ; preds = %124, %122
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  %128 = load i32, ptr %20, align 4
  switch i32 %128, label %170 [
    i32 0, label %129
    i32 6, label %130
  ]

129:                                              ; preds = %127
  br label %77

130:                                              ; preds = %127
  %131 = getelementptr inbounds %struct.tag_____IntRange__, ptr %6, i32 0, i32 1
  %132 = load i32, ptr %131, align 4, !tbaa !10
  store i32 %132, ptr %21, align 4, !tbaa !13
  %133 = load i32, ptr %14, align 4, !tbaa !13
  store i32 %133, ptr %22, align 4, !tbaa !13
  %134 = load i32, ptr %21, align 4, !tbaa !13
  %135 = load i32, ptr %22, align 4, !tbaa !13
  %136 = icmp slt i32 %134, %135
  br i1 %136, label %137, label %139

137:                                              ; preds = %130
  %138 = load i32, ptr %21, align 4, !tbaa !13
  br label %141

139:                                              ; preds = %130
  %140 = load i32, ptr %22, align 4, !tbaa !13
  br label %141

141:                                              ; preds = %139, %137
  %142 = phi i32 [ %138, %137 ], [ %140, %139 ]
  store i32 %142, ptr %23, align 4, !tbaa !13
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 40, i1 false)
  %143 = load i32, ptr %8, align 4, !tbaa !13
  %144 = add nsw i32 %143, 1
  %145 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %0, i32 0, i32 0
  store i32 %144, ptr %145, align 8, !tbaa !18
  %146 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %0, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %147 = load i32, ptr %7, align 4, !tbaa !13
  %148 = load i32, ptr %23, align 4, !tbaa !13
  %149 = call i64 @IntRange__cons__(i32 noundef %147, i32 noundef %148)
  store i64 %149, ptr %24, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %146, ptr align 4 %24, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %150 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %0, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %151 = load i32, ptr %7, align 4, !tbaa !13
  %152 = load i32, ptr %9, align 4, !tbaa !13
  %153 = sub nsw i32 %151, %152
  %154 = load i32, ptr %23, align 4, !tbaa !13
  %155 = load i32, ptr %9, align 4, !tbaa !13
  %156 = sub nsw i32 %154, %155
  %157 = call i64 @IntRange__cons__(i32 noundef %153, i32 noundef %156)
  store i64 %157, ptr %25, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %150, ptr align 4 %25, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  %158 = getelementptr inbounds %struct.tag_____LocationInfo__, ptr %0, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %159 = load i32, ptr %9, align 4, !tbaa !13
  %160 = load i32, ptr %14, align 4, !tbaa !13
  %161 = getelementptr inbounds { ptr, i32 }, ptr %5, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8
  %163 = getelementptr inbounds { ptr, i32 }, ptr %5, i32 0, i32 1
  %164 = load i32, ptr %163, align 8
  %165 = call { ptr, i32 } @string__slice__(ptr %162, i32 %164, i32 noundef %159, i32 noundef %160)
  %166 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 0
  %167 = extractvalue { ptr, i32 } %165, 0
  store ptr %167, ptr %166, align 8
  %168 = getelementptr inbounds { ptr, i32 }, ptr %26, i32 0, i32 1
  %169 = extractvalue { ptr, i32 } %165, 1
  store i32 %169, ptr %168, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %158, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !21
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  store i32 1, ptr %20, align 4
  br label %170

170:                                              ; preds = %141, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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


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

@top_____abandonFn__ = external dso_local thread_local local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #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 i64 @IntRange__cons__(i32 noundef, i32 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
define dso_local void @ErrorHelper__spanToLocationInfo__(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.tag_____LocationInfo__) align 8 %0, ptr %1, i32 %2, i64 %3) local_unnamed_addr #2 {
  %.sroa.042.0.extract.trunc = trunc i64 %3 to i32
  %.sroa.3.0.extract.shift = lshr i64 %3, 32
  %.sroa.3.0.extract.trunc = trunc nuw i64 %.sroa.3.0.extract.shift to i32
  %.not = icmp sgt i32 %.sroa.042.0.extract.trunc, %.sroa.3.0.extract.trunc
  br i1 %.not, label %5, label %8

5:                                                ; preds = %4
  %6 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  tail call void %7(i32 noundef -2) #4
  br label %8

8:                                                ; preds = %5, %4
  %9 = icmp sgt i32 %.sroa.042.0.extract.trunc, 0
  %10 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  br i1 %9, label %.lr.ph, label %.preheader

.lr.ph:                                           ; preds = %8
  %11 = zext i32 %2 to i64
  %wide.trip.count = and i64 %3, 2147483647
  br label %13

.preheader.loopexit:                              ; preds = %17
  %12 = add nuw nsw i32 %.1, 1
  br label %.preheader

.preheader:                                       ; preds = %8, %.preheader.loopexit
  %.045.lcssa = phi i32 [ %.146, %.preheader.loopexit ], [ 0, %8 ]
  %.0.lcssa = phi i32 [ %12, %.preheader.loopexit ], [ 1, %8 ]
  br label %23

13:                                               ; preds = %.lr.ph, %17
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %17 ]
  %.072 = phi i32 [ 0, %.lr.ph ], [ %.1, %17 ]
  %.04571 = phi i32 [ 0, %.lr.ph ], [ %.146, %17 ]
  %14 = icmp ult i64 %indvars.iv, %11
  br i1 %14, label %17, label %15

15:                                               ; preds = %13
  %16 = load ptr, ptr %10, align 8, !tbaa !5
  tail call void %16(i32 noundef -3) #4
  br label %17

17:                                               ; preds = %15, %13
  %18 = getelementptr inbounds i8, ptr %1, i64 %indvars.iv
  %19 = load i8, ptr %18, align 1, !tbaa !9
  %20 = icmp eq i8 %19, 10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = trunc nuw nsw i64 %indvars.iv.next to i32
  %.146 = select i1 %20, i32 %21, i32 %.04571
  %22 = zext i1 %20 to i32
  %.1 = add nuw nsw i32 %.072, %22
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader.loopexit, label %13

23:                                               ; preds = %.preheader, %27
  %.148 = phi i32 [ %31, %27 ], [ %.sroa.042.0.extract.trunc, %.preheader ]
  %24 = icmp ult i32 %.148, %2
  br i1 %24, label %27, label %25

25:                                               ; preds = %23
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  tail call void %26(i32 noundef -3) #4
  br label %27

27:                                               ; preds = %25, %23
  %28 = zext i32 %.148 to i64
  %29 = getelementptr inbounds i8, ptr %1, i64 %28
  %30 = load i8, ptr %29, align 1, !tbaa !9
  %31 = add nsw i32 %.148, 1
  switch i8 %30, label %23 [
    i8 13, label %32
    i8 10, label %32
    i8 0, label %32
  ]

32:                                               ; preds = %27, %27, %27
  %33 = tail call i32 @llvm.smin.i32(i32 %.148, i32 %.sroa.3.0.extract.trunc)
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %34, i8 0, i64 24, i1 false)
  store i32 %.0.lcssa, ptr %0, align 8, !tbaa !10
  %35 = getelementptr inbounds i8, ptr %0, i64 4
  %36 = tail call i64 @IntRange__cons__(i32 noundef %.sroa.042.0.extract.trunc, i32 noundef %33)
  store i64 %36, ptr %35, align 4
  %37 = getelementptr inbounds i8, ptr %0, i64 12
  %38 = sub nsw i32 %.sroa.042.0.extract.trunc, %.045.lcssa
  %39 = sub nsw i32 %33, %.045.lcssa
  %40 = tail call i64 @IntRange__cons__(i32 noundef %38, i32 noundef %39)
  store i64 %40, ptr %37, align 4
  %41 = getelementptr inbounds i8, ptr %0, i64 24
  %42 = tail call { ptr, i32 } @string__slice__(ptr nonnull %1, i32 %2, i32 noundef %.045.lcssa, i32 noundef %.148)
  %43 = extractvalue { ptr, i32 } %42, 0
  %44 = extractvalue { ptr, i32 } %42, 1
  store ptr %43, ptr %41, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %44, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !15
  ret void
}

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

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


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