; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_CGenerator (forwardPass__)

; 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_____SetEntry__Ptr__Array__Tag________ = type { i32, ptr }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }
%struct.tag_____Tag__ = type { ptr, ptr }
%struct.tag_____GenerateContext__ = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, %struct.string__, i32, %struct.string__, i32, ptr, ptr, i8 }
%struct.tag_____CommonTags__ = type { %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, %struct.tag_____Tag__, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.tag_____Namespace__ = type { %struct.string__, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32 }
%struct.tag_____CustomSet__Ptr__Array__Tag________ = type { %struct.tag_____Array__SetEntry__Ptr__Array__Tag__________, i32, i32, i32, ptr, ptr }
%struct.tag_____Array__SetEntry__Ptr__Array__Tag__________ = type { ptr, i32 }
%struct.tag_____Array__Tag____ = type { ptr, i32 }

@mu_____string406 = external dso_local global %struct.string__, align 8
@mu_____string408 = external dso_local global %struct.string__, align 8
@mu_____string409 = external dso_local global %struct.string__, align 8
@mu_____string407 = external dso_local global %struct.string__, align 8
@mu_____string410 = external dso_local global %struct.string__, align 8
@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 void @StringBuilder__write__(ptr noundef, ptr, i32) #4

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @CGenerator__forwardPass__(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %struct.tag_____SetEntry__Ptr__Array__Tag________, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.tag_____StringBuilder__, align 8
  %8 = alloca %struct.tag_____StringBuilder__, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.tag_____Tag__, align 8
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %struct.string__, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %18, i32 0, i32 3
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  call void @CGenerator__forwardNamespace__(ptr noundef %17, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %21, i32 0, i32 4
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  %24 = getelementptr inbounds %struct.tag_____CommonTags__, ptr %23, i32 0, i32 20
  %25 = load ptr, ptr %24, align 8, !tbaa !14
  %26 = getelementptr inbounds %struct.tag_____Namespace__, ptr %25, i32 0, i32 10
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  store ptr %27, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !19
  br label %28

28:                                               ; preds = %144, %1
  %29 = load i32, ptr %4, align 4, !tbaa !19
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.tag_____CustomSet__Ptr__Array__Tag________, ptr %30, i32 0, i32 0
  %32 = getelementptr inbounds %struct.tag_____Array__SetEntry__Ptr__Array__Tag__________, ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 8, !tbaa !20
  %34 = icmp slt i32 %29, %33
  br i1 %34, label %35, label %147

35:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #5
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.tag_____CustomSet__Ptr__Array__Tag________, ptr %36, i32 0, i32 0
  %38 = getelementptr inbounds %struct.tag_____Array__SetEntry__Ptr__Array__Tag__________, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !23
  %40 = load i32, ptr %4, align 4, !tbaa !19
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds %struct.tag_____SetEntry__Ptr__Array__Tag________, ptr %39, i64 %41
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %42, i64 16, i1 false), !tbaa.struct !24
  %43 = getelementptr inbounds %struct.tag_____SetEntry__Ptr__Array__Tag________, ptr %5, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !25
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %144

46:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %47 = getelementptr inbounds %struct.tag_____SetEntry__Ptr__Array__Tag________, ptr %5, i32 0, i32 1
  %48 = load ptr, ptr %47, align 8, !tbaa !27
  store ptr %48, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  call void @llvm.memset.p0.i64(ptr align 8 %7, i8 0, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %7, i64 16, i1 false), !tbaa.struct !28
  %49 = load ptr, ptr @mu_____string406, align 8
  %50 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string406, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %8, ptr %49, i32 %50)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %51, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.tag_____Array__Tag____, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 8, !tbaa !29
  %55 = sub nsw i32 %54, 1
  store i32 %55, ptr %10, align 4, !tbaa !19
  %56 = load i32, ptr %10, align 4, !tbaa !19
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.tag_____Array__Tag____, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 8, !tbaa !29
  %60 = icmp ult i32 %56, %59
  br i1 %60, label %64, label %61

61:                                               ; preds = %46
  %62 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  call void %63(i32 noundef -3)
  br label %64

64:                                               ; preds = %61, %46
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.tag_____Array__Tag____, ptr %65, i32 0, i32 0
  %67 = load ptr, ptr %66, align 8, !tbaa !31
  %68 = load i32, ptr %10, align 4, !tbaa !19
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds %struct.tag_____Tag__, ptr %67, i64 %69
  %71 = getelementptr inbounds { ptr, ptr }, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, ptr }, ptr %70, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8
  call void @CGenerator__writeTag__(ptr noundef %8, ptr %72, ptr %74)
  %75 = load ptr, ptr @mu_____string407, align 8
  %76 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string407, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %8, ptr %75, i32 %76)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 16, i1 false)
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %77, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  %80 = getelementptr inbounds %struct.tag_____CommonTags__, ptr %79, i32 0, i32 20
  %81 = load ptr, ptr %80, align 8, !tbaa !14
  %82 = getelementptr inbounds %struct.tag_____Tag__, ptr %11, i32 0, i32 0
  store ptr %81, ptr %82, align 8, !tbaa !32
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.tag_____Tag__, ptr %11, i32 0, i32 1
  store ptr %83, ptr %84, align 8, !tbaa !33
  %85 = getelementptr inbounds { ptr, ptr }, ptr %11, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8
  %87 = getelementptr inbounds { ptr, ptr }, ptr %11, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8
  call void @CGenerator__writeTag__(ptr noundef %8, ptr %86, ptr %88)
  %89 = load ptr, ptr @mu_____string408, align 8
  %90 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string408, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %8, ptr %89, i32 %90)
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  store i8 0, ptr %12, align 1, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !19
  br label %91

91:                                               ; preds = %116, %64
  %92 = load i32, ptr %13, align 4, !tbaa !19
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.tag_____Array__Tag____, ptr %93, i32 0, i32 1
  %95 = load i32, ptr %94, align 8, !tbaa !29
  %96 = sub nsw i32 %95, 1
  %97 = icmp slt i32 %92, %96
  br i1 %97, label %98, label %129

98:                                               ; preds = %91
  %99 = load i8, ptr %12, align 1, !tbaa !34
  %100 = icmp ne i8 %99, 0
  br i1 %100, label %101, label %104

101:                                              ; preds = %98
  %102 = load ptr, ptr @mu_____string409, align 8
  %103 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string409, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %8, ptr %102, i32 %103)
  br label %105

104:                                              ; preds = %98
  store i8 1, ptr %12, align 1, !tbaa !34
  br label %105

105:                                              ; preds = %104, %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %106, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %107 = load i32, ptr %13, align 4, !tbaa !19
  store i32 %107, ptr %15, align 4, !tbaa !19
  %108 = load i32, ptr %15, align 4, !tbaa !19
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.tag_____Array__Tag____, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 8, !tbaa !29
  %112 = icmp ult i32 %108, %111
  br i1 %112, label %116, label %113

113:                                              ; preds = %105
  %114 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  call void %115(i32 noundef -3)
  br label %116

116:                                              ; preds = %113, %105
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.tag_____Array__Tag____, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !31
  %120 = load i32, ptr %15, align 4, !tbaa !19
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds %struct.tag_____Tag__, ptr %119, i64 %121
  %123 = getelementptr inbounds { ptr, ptr }, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8
  %125 = getelementptr inbounds { ptr, ptr }, ptr %122, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8
  call void @CGenerator__writeTag__(ptr noundef %8, ptr %124, ptr %126)
  %127 = load i32, ptr %13, align 4, !tbaa !19
  %128 = add nsw i32 %127, 1
  store i32 %128, ptr %13, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %91, !llvm.loop !35

129:                                              ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %130 = load ptr, ptr @mu_____string410, align 8
  %131 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string410, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %8, ptr %130, i32 %131)
  %132 = load ptr, ptr %2, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %132, i32 0, i32 5
  %134 = load ptr, ptr %133, align 8, !tbaa !37
  %135 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef %8)
  %136 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %137 = extractvalue { ptr, i32 } %135, 0
  store ptr %137, ptr %136, align 8
  %138 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %139 = extractvalue { ptr, i32 } %135, 1
  store i32 %139, ptr %138, align 8
  %140 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8
  %142 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %143 = load i32, ptr %142, align 8
  call void @CodeBuilder__writeLine__(ptr noundef %134, ptr %141, i32 %143)
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %144

144:                                              ; preds = %129, %35
  %145 = load i32, ptr %4, align 4, !tbaa !19
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %4, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #5
  br label %28, !llvm.loop !38

147:                                              ; preds = %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"tag_____GenerateContext__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !11, i64 96, !12, i64 104, !11, i64 120, !6, i64 128, !6, i64 136, !7, i64 144}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !6, i64 0, !11, i64 8}
!13 = !{!10, !6, i64 32}
!14 = !{!15, !6, i64 312}
!15 = !{!"tag_____CommonTags__", !16, i64 0, !16, i64 16, !16, i64 32, !16, i64 48, !16, i64 64, !16, i64 80, !16, i64 96, !16, i64 112, !16, i64 128, !16, i64 144, !16, i64 160, !16, i64 176, !16, i64 192, !16, i64 208, !16, i64 224, !16, i64 240, !16, i64 256, !16, i64 272, !16, i64 288, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376}
!16 = !{!"tag_____Tag__", !6, i64 0, !6, i64 8}
!17 = !{!18, !6, i64 80}
!18 = !{!"tag_____Namespace__", !12, i64 0, !6, i64 16, !11, i64 24, !11, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104}
!19 = !{!11, !11, i64 0}
!20 = !{!21, !11, i64 8}
!21 = !{!"tag_____CustomSet__Ptr__Array__Tag________", !22, i64 0, !11, i64 16, !11, i64 20, !11, i64 24, !6, i64 32, !6, i64 40}
!22 = !{!"tag_____Array__SetEntry__Ptr__Array__Tag__________", !6, i64 0, !11, i64 8}
!23 = !{!21, !6, i64 0}
!24 = !{i64 0, i64 4, !19, i64 8, i64 8, !5}
!25 = !{!26, !11, i64 0}
!26 = !{!"tag_____SetEntry__Ptr__Array__Tag________", !11, i64 0, !6, i64 8}
!27 = !{!26, !6, i64 8}
!28 = !{i64 0, i64 8, !5, i64 8, i64 4, !19, i64 12, i64 4, !19}
!29 = !{!30, !11, i64 8}
!30 = !{!"tag_____Array__Tag____", !6, i64 0, !11, i64 8}
!31 = !{!30, !6, i64 0}
!32 = !{!16, !6, i64 0}
!33 = !{!16, !6, i64 8}
!34 = !{!7, !7, i64 0}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!10, !6, i64 40}
!38 = distinct !{!38, !36}


; 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_____StringBuilder__ = type { ptr, i32, i32 }
%struct.tag_____SetEntry__Ptr__Array__Tag________ = type { i32, ptr }
%struct.tag_____Tag__ = type { ptr, ptr }

@mu_____string406 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string408 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string409 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string407 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string410 = external dso_local local_unnamed_addr global %struct.string__, align 8
@top_____abandonFn__ = external dso_local thread_local 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 void @StringBuilder__write__(ptr noundef, ptr, i32) local_unnamed_addr #3

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @CGenerator__forwardPass__(ptr noundef %0) local_unnamed_addr #3 {
  %2 = alloca %struct.tag_____StringBuilder__, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  tail call void @CGenerator__forwardNamespace__(ptr noundef %0, ptr noundef %4)
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %6, i64 312
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %8, i64 80
  %10 = load ptr, ptr %9, align 8, !tbaa !16
  %11 = getelementptr inbounds i8, ptr %10, i64 8
  %12 = load i32, ptr %11, align 8, !tbaa !18
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph37, label %._crit_edge38

.lr.ph37:                                         ; preds = %1
  %14 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %15 = getelementptr inbounds i8, ptr %0, i64 40
  br label %16

16:                                               ; preds = %.lr.ph37, %68
  %17 = phi i32 [ %12, %.lr.ph37 ], [ %69, %68 ]
  %indvars.iv40 = phi i64 [ 0, %.lr.ph37 ], [ %indvars.iv.next41, %68 ]
  %18 = load ptr, ptr %10, align 8, !tbaa !21
  %19 = getelementptr inbounds %struct.tag_____SetEntry__Ptr__Array__Tag________, ptr %18, i64 %indvars.iv40
  %.sroa.017.0.copyload = load i32, ptr %19, align 8, !tbaa !22
  %.sroa.418.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  %.sroa.418.0.copyload = load ptr, ptr %.sroa.418.0..sroa_idx, align 8, !tbaa !23
  %.not = icmp eq i32 %.sroa.017.0.copyload, 0
  br i1 %.not, label %68, label %20

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, i8 0, i64 16, i1 false)
  %21 = load ptr, ptr @mu_____string406, align 8
  %22 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string406, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %2, ptr %21, i32 %22)
  %23 = getelementptr inbounds i8, ptr %.sroa.418.0.copyload, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !24
  %25 = add nsw i32 %24, -1
  %.not31 = icmp eq i32 %24, 0
  br i1 %.not31, label %26, label %28

26:                                               ; preds = %20
  %27 = load ptr, ptr %14, align 8, !tbaa !23
  call void %27(i32 noundef -3) #4
  br label %28

28:                                               ; preds = %26, %20
  %29 = load ptr, ptr %.sroa.418.0.copyload, align 8, !tbaa !26
  %30 = zext i32 %25 to i64
  %31 = getelementptr inbounds %struct.tag_____Tag__, ptr %29, i64 %30
  %32 = load ptr, ptr %31, align 8
  %33 = getelementptr inbounds i8, ptr %31, i64 8
  %34 = load ptr, ptr %33, align 8
  call void @CGenerator__writeTag__(ptr noundef nonnull %2, ptr %32, ptr %34)
  %35 = load ptr, ptr @mu_____string407, align 8
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string407, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %2, ptr %35, i32 %36)
  %37 = load ptr, ptr %5, align 8, !tbaa !12
  %38 = getelementptr inbounds i8, ptr %37, i64 312
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  call void @CGenerator__writeTag__(ptr noundef nonnull %2, ptr %39, ptr nonnull %.sroa.418.0.copyload)
  %40 = load ptr, ptr @mu_____string408, align 8
  %41 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string408, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %2, ptr %40, i32 %41)
  %42 = load i32, ptr %23, align 8, !tbaa !24
  %43 = icmp sgt i32 %42, 1
  br i1 %43, label %._crit_edge43, label %._crit_edge

._crit_edge43:                                    ; preds = %28
  %.pre = load ptr, ptr %.sroa.418.0.copyload, align 8, !tbaa !26
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre, i64 8
  %.pre45 = load ptr, ptr %.phi.trans.insert, align 8
  %.pre44 = load ptr, ptr %.pre, align 8
  call void @CGenerator__writeTag__(ptr noundef nonnull %2, ptr %.pre44, ptr %.pre45)
  %44 = load i32, ptr %23, align 8, !tbaa !24
  %45 = icmp sgt i32 %44, 2
  br i1 %45, label %.lr.ph.peel.next, label %._crit_edge

.lr.ph.peel.next:                                 ; preds = %._crit_edge43, %52
  %indvars.iv = phi i64 [ %indvars.iv.next, %52 ], [ 1, %._crit_edge43 ]
  %46 = load ptr, ptr @mu_____string409, align 8
  %47 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string409, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %2, ptr %46, i32 %47)
  %.pre46 = load i32, ptr %23, align 8, !tbaa !24
  %48 = zext i32 %.pre46 to i64
  %49 = icmp ult i64 %indvars.iv, %48
  br i1 %49, label %52, label %50

50:                                               ; preds = %.lr.ph.peel.next
  %51 = load ptr, ptr %14, align 8, !tbaa !23
  call void %51(i32 noundef -3) #4
  br label %52

52:                                               ; preds = %50, %.lr.ph.peel.next
  %53 = load ptr, ptr %.sroa.418.0.copyload, align 8, !tbaa !26
  %54 = getelementptr inbounds %struct.tag_____Tag__, ptr %53, i64 %indvars.iv
  %55 = load ptr, ptr %54, align 8
  %56 = getelementptr inbounds i8, ptr %54, i64 8
  %57 = load ptr, ptr %56, align 8
  call void @CGenerator__writeTag__(ptr noundef nonnull %2, ptr %55, ptr %57)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = load i32, ptr %23, align 8, !tbaa !24
  %59 = add nsw i32 %58, -1
  %60 = sext i32 %59 to i64
  %61 = icmp slt i64 %indvars.iv.next, %60
  br i1 %61, label %.lr.ph.peel.next, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %52, %._crit_edge43, %28
  %62 = load ptr, ptr @mu_____string410, align 8
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string410, i64 8), align 8
  call void @StringBuilder__write__(ptr noundef nonnull %2, ptr %62, i32 %63)
  %64 = load ptr, ptr %15, align 8, !tbaa !30
  %65 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef nonnull %2)
  %66 = extractvalue { ptr, i32 } %65, 0
  %67 = extractvalue { ptr, i32 } %65, 1
  call void @CodeBuilder__writeLine__(ptr noundef %64, ptr %66, i32 %67)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #4
  %.pre47 = load i32, ptr %11, align 8, !tbaa !18
  br label %68

68:                                               ; preds = %._crit_edge, %16
  %69 = phi i32 [ %.pre47, %._crit_edge ], [ %17, %16 ]
  %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
  %70 = sext i32 %69 to i64
  %71 = icmp slt i64 %indvars.iv.next41, %70
  br i1 %71, label %16, label %._crit_edge38, !llvm.loop !31

._crit_edge38:                                    ; preds = %68, %1
  ret void
}

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 = { 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 24}
!6 = !{!"tag_____GenerateContext__", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !10, i64 52, !7, i64 56, !7, i64 64, !7, i64 72, !11, i64 80, !10, i64 96, !11, i64 104, !10, i64 120, !7, i64 128, !7, i64 136, !8, i64 144}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"", !7, i64 0, !10, i64 8}
!12 = !{!6, !7, i64 32}
!13 = !{!14, !7, i64 312}
!14 = !{!"tag_____CommonTags__", !15, i64 0, !15, i64 16, !15, i64 32, !15, i64 48, !15, i64 64, !15, i64 80, !15, i64 96, !15, i64 112, !15, i64 128, !15, i64 144, !15, i64 160, !15, i64 176, !15, i64 192, !15, i64 208, !15, i64 224, !15, i64 240, !15, i64 256, !15, i64 272, !15, i64 288, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376}
!15 = !{!"tag_____Tag__", !7, i64 0, !7, i64 8}
!16 = !{!17, !7, i64 80}
!17 = !{!"tag_____Namespace__", !11, i64 0, !7, i64 16, !10, i64 24, !10, i64 28, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !10, i64 104}
!18 = !{!19, !10, i64 8}
!19 = !{!"tag_____CustomSet__Ptr__Array__Tag________", !20, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 32, !7, i64 40}
!20 = !{!"tag_____Array__SetEntry__Ptr__Array__Tag__________", !7, i64 0, !10, i64 8}
!21 = !{!19, !7, i64 0}
!22 = !{!10, !10, i64 0}
!23 = !{!7, !7, i64 0}
!24 = !{!25, !10, i64 8}
!25 = !{!"tag_____Array__Tag____", !7, i64 0, !10, i64 8}
!26 = !{!25, !7, i64 0}
!27 = distinct !{!27, !28, !29}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.peeled.count", i32 1}
!30 = !{!6, !7, i64 40}
!31 = distinct !{!31, !28}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass