; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_Stdin (tryReadLine__)

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

@top_____abandonFn__ = external dso_local thread_local global ptr, align 8
@stdin = external 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 { ptr, i32 } @StringBuilder__compactToString__(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local void @Stdin__tryReadLine__(ptr dead_on_unwind noalias writable sret(%struct.tag_____Result__string____) align 8 %0) #4 {
  %2 = alloca %struct.tag_____StringBuilder__, align 8
  %3 = alloca %struct.tag_____StringBuilder__, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.string__, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i8, align 1
  %14 = alloca %struct.string__, align 8
  %15 = alloca %struct.string__, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %2) #7
  call void @llvm.memset.p0.i64(ptr align 8 %2, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %2, i64 16, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 4096, ptr %4, align 4, !tbaa !10
  br label %16

16:                                               ; preds = %138, %1
  br label %17

17:                                               ; preds = %16
  %18 = load i32, ptr %4, align 4, !tbaa !10
  call void @StringBuilder__reserveForWrite__(ptr noundef %3, i32 noundef %18)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %19 = getelementptr inbounds %struct.tag_____StringBuilder__, ptr %3, i32 0, i32 0
  %20 = load ptr, ptr %19, align 8, !tbaa !12
  %21 = getelementptr inbounds %struct.tag_____StringBuilder__, ptr %3, i32 0, i32 1
  %22 = load i32, ptr %21, align 8, !tbaa !14
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i8, ptr %20, i64 %23
  store ptr %24, ptr %5, align 8, !tbaa !6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %25 = load ptr, ptr %5, align 8, !tbaa !6
  %26 = load i32, ptr %4, align 4, !tbaa !10
  %27 = load ptr, ptr @stdin, align 8, !tbaa !6
  %28 = call ptr @fgets(ptr noundef %25, i32 noundef %26, ptr noundef %27)
  store ptr %28, ptr %6, align 8, !tbaa !6
  %29 = load ptr, ptr %6, align 8, !tbaa !6
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %42

31:                                               ; preds = %17
  %32 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %3)
  %33 = getelementptr inbounds { ptr, i32 }, ptr %7, i32 0, i32 0
  %34 = extractvalue { ptr, i32 } %32, 0
  store ptr %34, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i32 }, ptr %7, i32 0, i32 1
  %36 = extractvalue { ptr, i32 } %32, 1
  store i32 %36, ptr %35, align 8
  %37 = load ptr, ptr @stdin, align 8, !tbaa !6
  %38 = call i32 @feof(ptr noundef %37) #7
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %31
  call void @Result__fromError__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, i32 noundef 1)
  store i32 1, ptr %8, align 4
  br label %136

41:                                               ; preds = %31
  call void @Result__fromError__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, i32 noundef 2)
  store i32 1, ptr %8, align 4
  br label %136

42:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %43 = load ptr, ptr %5, align 8, !tbaa !6
  store ptr %43, ptr %9, align 8, !tbaa !6
  br label %44

44:                                               ; preds = %51, %42
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %9, align 8, !tbaa !6
  %47 = load i8, ptr %46, align 1, !tbaa !15
  %48 = zext i8 %47 to i32
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %51, label %50

50:                                               ; preds = %45
  br label %54

51:                                               ; preds = %45
  %52 = load ptr, ptr %9, align 8, !tbaa !6
  %53 = getelementptr inbounds i8, ptr %52, i64 1
  store ptr %53, ptr %9, align 8, !tbaa !6
  br label %44

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %55 = load ptr, ptr %9, align 8, !tbaa !6
  %56 = load ptr, ptr %5, align 8, !tbaa !6
  %57 = call i64 @pointer__subtractSigned__(ptr noundef %55, ptr noundef %56)
  store i64 %57, ptr %10, align 8, !tbaa !16
  %58 = load i64, ptr %10, align 8, !tbaa !16
  %59 = add nsw i64 %58, 2147483647
  %60 = add nsw i64 %59, 1
  %61 = icmp sle i64 %60, 4294967295
  br i1 %61, label %65, label %62

62:                                               ; preds = %54
  %63 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %64 = load ptr, ptr %63, align 8, !tbaa !6
  call void %64(i32 noundef -4)
  br label %65

65:                                               ; preds = %62, %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %66 = load i64, ptr %10, align 8, !tbaa !16
  %67 = trunc i64 %66 to i32
  store i32 %67, ptr %11, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  %68 = load i32, ptr %11, align 4, !tbaa !10
  %69 = icmp slt i32 0, %68
  %70 = zext i1 %69 to i32
  %71 = trunc i32 %70 to i8
  store i8 %71, ptr %12, align 1, !tbaa !15
  %72 = load i8, ptr %12, align 1, !tbaa !15
  %73 = icmp ne i8 %72, 0
  br i1 %73, label %74, label %80

74:                                               ; preds = %65
  %75 = load i32, ptr %11, align 4, !tbaa !10
  %76 = load i32, ptr %4, align 4, !tbaa !10
  %77 = icmp slt i32 %75, %76
  %78 = zext i1 %77 to i32
  %79 = trunc i32 %78 to i8
  store i8 %79, ptr %12, align 1, !tbaa !15
  br label %80

80:                                               ; preds = %74, %65
  %81 = load i8, ptr %12, align 1, !tbaa !15
  %82 = icmp ne i8 %81, 0
  br i1 %82, label %86, label %83

83:                                               ; preds = %80
  %84 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %85 = load ptr, ptr %84, align 8, !tbaa !6
  call void %85(i32 noundef -2)
  br label %86

86:                                               ; preds = %83, %80
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #7
  %87 = load ptr, ptr %5, align 8, !tbaa !6
  %88 = load i32, ptr %11, align 4, !tbaa !10
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i8, ptr %87, i64 %89
  %91 = getelementptr inbounds i8, ptr %90, i64 -1
  %92 = load i8, ptr %91, align 1, !tbaa !15
  store i8 %92, ptr %13, align 1, !tbaa !15
  %93 = load i8, ptr %13, align 1, !tbaa !15
  %94 = sext i8 %93 to i32
  %95 = icmp eq i32 %94, 10
  br i1 %95, label %96, label %113

96:                                               ; preds = %86
  %97 = load i32, ptr %11, align 4, !tbaa !10
  %98 = sub nsw i32 %97, 1
  store i32 %98, ptr %11, align 4, !tbaa !10
  %99 = getelementptr inbounds %struct.tag_____StringBuilder__, ptr %3, i32 0, i32 1
  %100 = load i32, ptr %99, align 8, !tbaa !14
  %101 = load i32, ptr %11, align 4, !tbaa !10
  %102 = add nsw i32 %100, %101
  %103 = getelementptr inbounds %struct.tag_____StringBuilder__, ptr %3, i32 0, i32 1
  store i32 %102, ptr %103, align 8, !tbaa !14
  %104 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %3)
  %105 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 0
  %106 = extractvalue { ptr, i32 } %104, 0
  store ptr %106, ptr %105, align 8
  %107 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 1
  %108 = extractvalue { ptr, i32 } %104, 1
  store i32 %108, ptr %107, align 8
  %109 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8
  %111 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 1
  %112 = load i32, ptr %111, align 8
  call void @Result__fromValue__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, ptr %110, i32 %112)
  store i32 1, ptr %8, align 4
  br label %135

113:                                              ; preds = %86
  %114 = getelementptr inbounds %struct.tag_____StringBuilder__, ptr %3, i32 0, i32 1
  %115 = load i32, ptr %114, align 8, !tbaa !14
  %116 = load i32, ptr %11, align 4, !tbaa !10
  %117 = add nsw i32 %115, %116
  %118 = getelementptr inbounds %struct.tag_____StringBuilder__, ptr %3, i32 0, i32 1
  store i32 %117, ptr %118, align 8, !tbaa !14
  %119 = load i32, ptr %11, align 4, !tbaa !10
  %120 = load i32, ptr %4, align 4, !tbaa !10
  %121 = sub nsw i32 %120, 1
  %122 = icmp slt i32 %119, %121
  br i1 %122, label %123, label %133

123:                                              ; preds = %113
  %124 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef %3)
  %125 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %126 = extractvalue { ptr, i32 } %124, 0
  store ptr %126, ptr %125, align 8
  %127 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %128 = extractvalue { ptr, i32 } %124, 1
  store i32 %128, ptr %127, align 8
  %129 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8
  %131 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %132 = load i32, ptr %131, align 8
  call void @Result__fromValue__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, ptr %130, i32 %132)
  store i32 1, ptr %8, align 4
  br label %135

133:                                              ; preds = %113
  br label %134

134:                                              ; preds = %133
  store i32 0, ptr %8, align 4
  br label %135

135:                                              ; preds = %134, %123, %96
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %136

136:                                              ; preds = %135, %41, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %137 = load i32, ptr %8, align 4
  switch i32 %137, label %139 [
    i32 0, label %138
  ]

138:                                              ; preds = %136
  br label %16

139:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #7
  ret void
}

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

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: nounwind
declare i32 @feof(ptr noundef) #6

; Function Attrs: nounwind uwtable
declare dso_local void @Result__fromError__string____(ptr dead_on_unwind noalias writable sret(%struct.tag_____Result__string____) align 8, i32 noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @Result__fromValue__string____(ptr dead_on_unwind noalias writable sret(%struct.tag_____Result__string____) align 8, ptr, i32) #4

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 = { "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 #6 = { nounwind "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 #7 = { 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 = !{i64 0, i64 8, !6, i64 8, i64 4, !10, i64 12, i64 4, !10}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"tag_____StringBuilder__", !7, i64 0, !11, i64 8, !11, i64 12}
!14 = !{!13, !11, i64 8}
!15 = !{!8, !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !8, 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.tag_____Result__string____ = type { %struct.string__, i32 }
%struct.string__ = type { ptr, i32 }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @pointer__subtractSigned__(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @Stdin__tryReadLine__(ptr dead_on_unwind noalias writable sret(%struct.tag_____Result__string____) align 8 %0) local_unnamed_addr #3 {
  %2 = alloca %struct.tag_____StringBuilder__, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  %3 = getelementptr inbounds i8, ptr %2, i64 8
  %4 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  br label %5

5:                                                ; preds = %44, %1
  call void @StringBuilder__reserveForWrite__(ptr noundef nonnull %2, i32 noundef 4096)
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = load i32, ptr %3, align 8, !tbaa !11
  %8 = sext i32 %7 to i64
  %9 = getelementptr inbounds i8, ptr %6, i64 %8
  %10 = load ptr, ptr @stdin, align 8, !tbaa !12
  %11 = call ptr @fgets(ptr noundef %9, i32 noundef 4096, ptr noundef %10)
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %.preheader

13:                                               ; preds = %5
  %14 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %2)
  %15 = load ptr, ptr @stdin, align 8, !tbaa !12
  %16 = call i32 @feof(ptr noundef %15) #5
  %.not31 = icmp eq i32 %16, 0
  br i1 %.not31, label %18, label %17

17:                                               ; preds = %13
  call void @Result__fromError__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, i32 noundef 1)
  br label %52

18:                                               ; preds = %13
  call void @Result__fromError__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, i32 noundef 2)
  br label %52

.preheader:                                       ; preds = %5, %.preheader
  %.027 = phi ptr [ %20, %.preheader ], [ %9, %5 ]
  %19 = load i8, ptr %.027, align 1, !tbaa !13
  %.not = icmp eq i8 %19, 0
  %20 = getelementptr inbounds i8, ptr %.027, i64 1
  br i1 %.not, label %21, label %.preheader

21:                                               ; preds = %.preheader
  %22 = call i64 @pointer__subtractSigned__(ptr noundef nonnull %.027, ptr noundef %9)
  %23 = icmp slt i64 %22, 2147483648
  br i1 %23, label %26, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr %4, align 8, !tbaa !12
  call void %25(i32 noundef -4) #5
  br label %26

26:                                               ; preds = %24, %21
  %27 = trunc i64 %22 to i32
  %28 = add i32 %27, -4096
  %narrow = icmp ult i32 %28, -4095
  br i1 %narrow, label %29, label %31

29:                                               ; preds = %26
  %30 = load ptr, ptr %4, align 8, !tbaa !12
  call void %30(i32 noundef -2) #5
  br label %31

31:                                               ; preds = %29, %26
  %sext = shl i64 %22, 32
  %32 = ashr exact i64 %sext, 32
  %33 = getelementptr inbounds i8, ptr %9, i64 %32
  %34 = getelementptr inbounds i8, ptr %33, i64 -1
  %35 = load i8, ptr %34, align 1, !tbaa !13
  %36 = icmp eq i8 %35, 10
  br i1 %36, label %37, label %44

37:                                               ; preds = %31
  %38 = add nsw i32 %27, -1
  %39 = load i32, ptr %3, align 8, !tbaa !11
  %40 = add nsw i32 %38, %39
  store i32 %40, ptr %3, align 8, !tbaa !11
  %41 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %2)
  %42 = extractvalue { ptr, i32 } %41, 0
  %43 = extractvalue { ptr, i32 } %41, 1
  call void @Result__fromValue__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, ptr %42, i32 %43)
  br label %52

44:                                               ; preds = %31
  %45 = load i32, ptr %3, align 8, !tbaa !11
  %46 = add nsw i32 %45, %27
  store i32 %46, ptr %3, align 8, !tbaa !11
  %47 = icmp slt i32 %27, 4095
  br i1 %47, label %48, label %5

48:                                               ; preds = %44
  %49 = call { ptr, i32 } @StringBuilder__compactToString__(ptr noundef nonnull %2)
  %50 = extractvalue { ptr, i32 } %49, 0
  %51 = extractvalue { ptr, i32 } %49, 1
  call void @Result__fromValue__string____(ptr dead_on_unwind writable sret(%struct.tag_____Result__string____) align 8 %0, ptr %50, i32 %51)
  br label %52

52:                                               ; preds = %17, %18, %37, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  ret void
}

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

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @feof(ptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @Result__fromError__string____(ptr dead_on_unwind noalias writable sret(%struct.tag_____Result__string____) align 8, i32 noundef) local_unnamed_addr #3

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

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


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