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

; 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.Node__ = type { i32, ptr }
%struct.tag_____FunctionDef__ = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Node__, ptr, ptr, ptr, ptr, i32, ptr, %struct.string__, %struct.string__, %struct.tag_____Tag__, i32, ptr, ptr, ptr, ptr, %struct.string__ }
%struct.tag_____Tag__ = type { ptr, ptr }
%struct.tag_____List__Ptr__Param______ = type { ptr, i32, i32 }
%struct.tag_____CallExpression__ = type { %struct.Node__, ptr, ptr, ptr, ptr, ptr }
%struct.tag_____List__Node____ = type { ptr, i32, i32 }

@mu_____string438 = external dso_local global %struct.string__, align 8
@mu_____string409 = external dso_local global %struct.string__, align 8
@mu_____string303 = 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: 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
define dso_local void @CGenerator__genForeignCallImpl__(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 %3, ptr %4, ptr noundef %5) #3 {
  %7 = alloca %struct.Node__, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %struct.Node__, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 0
  store i32 %3, ptr %23, align 8
  %24 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 1
  store ptr %4, ptr %24, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.tag_____FunctionDef__, ptr %26, i32 0, i32 14
  %28 = getelementptr inbounds { ptr, i32 }, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8
  %30 = getelementptr inbounds { ptr, i32 }, ptr %27, i32 0, i32 1
  %31 = load i32, ptr %30, align 8
  call void @StringBuilder__write__(ptr noundef %25, ptr %29, i32 %31)
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = load ptr, ptr @mu_____string438, align 8
  %34 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string438, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %32, ptr %33, i32 %34)
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #4
  store i8 0, ptr %12, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !10
  %35 = getelementptr inbounds %struct.Node__, ptr %7, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !12
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %64

38:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.tag_____FunctionDef__, ptr %39, i32 0, i32 4
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  store ptr %41, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !10
  %42 = load i32, ptr %15, align 4, !tbaa !10
  %43 = load ptr, ptr %14, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.tag_____List__Ptr__Param______, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 8, !tbaa !18
  %46 = icmp ult i32 %42, %45
  br i1 %46, label %50, label %47

47:                                               ; preds = %38
  %48 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  call void %49(i32 noundef -3)
  br label %50

50:                                               ; preds = %47, %38
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.tag_____List__Ptr__Param______, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !20
  %55 = load i32, ptr %15, align 4, !tbaa !10
  %56 = zext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 0
  %61 = load i32, ptr %60, align 8
  %62 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8
  call void @CGenerator__genForeignArg__(ptr noundef %51, i32 %61, ptr %63, ptr noundef %58, i8 noundef zeroext 1, ptr noundef %59)
  store i8 1, ptr %12, align 1, !tbaa !9
  store i32 1, ptr %13, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %64

64:                                               ; preds = %50, %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.tag_____CallExpression__, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !21
  store ptr %67, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !10
  br label %68

68:                                               ; preds = %121, %64
  %69 = load i32, ptr %17, align 4, !tbaa !10
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.tag_____List__Node____, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 8, !tbaa !23
  %73 = icmp slt i32 %69, %72
  br i1 %73, label %74, label %131

74:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #4
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.tag_____List__Node____, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !25
  %78 = load i32, ptr %17, align 4, !tbaa !10
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.Node__, ptr %77, i64 %79
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %80, i64 16, i1 false), !tbaa.struct !26
  %81 = load i8, ptr %12, align 1, !tbaa !9
  %82 = icmp ne i8 %81, 0
  br i1 %82, label %83, label %87

83:                                               ; preds = %74
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = load ptr, ptr @mu_____string409, align 8
  %86 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string409, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %84, ptr %85, i32 %86)
  br label %88

87:                                               ; preds = %74
  store i8 1, ptr %12, align 1, !tbaa !9
  br label %88

88:                                               ; preds = %87, %83
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %89 = load i32, ptr %17, align 4, !tbaa !10
  %90 = load i32, ptr %13, align 4, !tbaa !10
  %91 = add nsw i32 %89, %90
  store i32 %91, ptr %19, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %92 = load i32, ptr %19, align 4, !tbaa !10
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.tag_____FunctionDef__, ptr %93, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !14
  %96 = getelementptr inbounds %struct.tag_____List__Ptr__Param______, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 8, !tbaa !18
  %98 = icmp slt i32 %92, %97
  br i1 %98, label %99, label %120

99:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.tag_____FunctionDef__, ptr %100, i32 0, i32 4
  %102 = load ptr, ptr %101, align 8, !tbaa !14
  store ptr %102, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %103 = load i32, ptr %19, align 4, !tbaa !10
  store i32 %103, ptr %22, align 4, !tbaa !10
  %104 = load i32, ptr %22, align 4, !tbaa !10
  %105 = load ptr, ptr %21, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.tag_____List__Ptr__Param______, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 8, !tbaa !18
  %108 = icmp ult i32 %104, %107
  br i1 %108, label %112, label %109

109:                                              ; preds = %99
  %110 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  call void %111(i32 noundef -3)
  br label %112

112:                                              ; preds = %109, %99
  %113 = load ptr, ptr %21, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.tag_____List__Ptr__Param______, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !20
  %116 = load i32, ptr %22, align 4, !tbaa !10
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds ptr, ptr %115, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  store ptr %119, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %121

120:                                              ; preds = %88
  store ptr null, ptr %20, align 8, !tbaa !5
  br label %121

121:                                              ; preds = %120, %112
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = load ptr, ptr %20, align 8, !tbaa !5
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds { i32, ptr }, ptr %18, i32 0, i32 0
  %126 = load i32, ptr %125, align 8
  %127 = getelementptr inbounds { i32, ptr }, ptr %18, i32 0, i32 1
  %128 = load ptr, ptr %127, align 8
  call void @CGenerator__genForeignArg__(ptr noundef %122, i32 %126, ptr %128, ptr noundef %123, i8 noundef zeroext 0, ptr noundef %124)
  %129 = load i32, ptr %17, align 4, !tbaa !10
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %17, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #4
  br label %68, !llvm.loop !27

131:                                              ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = load ptr, ptr @mu_____string303, align 8
  %134 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string303, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %132, ptr %133, i32 %134)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #4
  ret void
}

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

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: 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, !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, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"", !11, i64 0, !6, i64 8}
!14 = !{!15, !6, i64 32}
!15 = !{!"tag_____FunctionDef__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !13, i64 56, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !6, i64 112, !16, i64 120, !16, i64 136, !17, i64 152, !11, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !16, i64 208}
!16 = !{!"", !6, i64 0, !11, i64 8}
!17 = !{!"tag_____Tag__", !6, i64 0, !6, i64 8}
!18 = !{!19, !11, i64 8}
!19 = !{!"tag_____List__Ptr__Param______", !6, i64 0, !11, i64 8, !11, i64 12}
!20 = !{!19, !6, i64 0}
!21 = !{!22, !6, i64 24}
!22 = !{!"tag_____CallExpression__", !13, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!23 = !{!24, !11, i64 8}
!24 = !{!"tag_____List__Node____", !6, i64 0, !11, i64 8, !11, i64 12}
!25 = !{!24, !6, i64 0}
!26 = !{i64 0, i64 4, !10, i64 8, i64 8, !5}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; 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.Node__ = type { i32, ptr }

@mu_____string438 = 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_____string303 = 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 speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

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

; Function Attrs: nounwind uwtable
define dso_local void @CGenerator__genForeignCallImpl__(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2, i32 %3, ptr %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = getelementptr inbounds i8, ptr %1, i64 120
  %8 = load ptr, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr %1, i64 128
  %10 = load i32, ptr %9, align 8
  tail call void @StringBuilder__write__(ptr noundef %5, ptr %8, i32 %10)
  %11 = load ptr, ptr @mu_____string438, align 8
  %12 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string438, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %5, ptr %11, i32 %12)
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %21, label %13

13:                                               ; preds = %6
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !14
  %.not40 = icmp eq i32 %17, 0
  br i1 %.not40, label %18, label %.thread

18:                                               ; preds = %13
  %19 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %20 = load ptr, ptr %19, align 8, !tbaa !16
  tail call void %20(i32 noundef -3) #2
  br label %.thread

21:                                               ; preds = %6
  %22 = getelementptr inbounds i8, ptr %2, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !17
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !19
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

.thread:                                          ; preds = %13, %18
  %27 = load ptr, ptr %15, align 8, !tbaa !21
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  tail call void @CGenerator__genForeignArg__(ptr noundef %0, i32 %3, ptr nonnull %4, ptr noundef %28, i8 noundef zeroext 1, ptr noundef %5)
  %29 = getelementptr inbounds i8, ptr %2, i64 24
  %30 = load ptr, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load i32, ptr %31, align 8, !tbaa !19
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %36, label %._crit_edge

.lr.ph:                                           ; preds = %21
  %34 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %35 = load ptr, ptr %23, align 8, !tbaa !22
  %.sroa.0.0.copyload.peel = load i32, ptr %35, align 8, !tbaa !23
  %.sroa.46.0..sroa_idx.peel = getelementptr inbounds i8, ptr %35, i64 8
  %.sroa.46.0.copyload.peel = load ptr, ptr %.sroa.46.0..sroa_idx.peel, align 8, !tbaa !16
  br label %41

36:                                               ; preds = %.thread
  %37 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____abandonFn__)
  %38 = load ptr, ptr %30, align 8, !tbaa !22
  %.sroa.0.0.copyload.peel49 = load i32, ptr %38, align 8, !tbaa !23
  %.sroa.46.0..sroa_idx.peel50 = getelementptr inbounds i8, ptr %38, i64 8
  %.sroa.46.0.copyload.peel51 = load ptr, ptr %.sroa.46.0..sroa_idx.peel50, align 8, !tbaa !16
  %39 = load ptr, ptr @mu_____string409, align 8
  %40 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string409, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %5, ptr %39, i32 %40)
  br label %41

41:                                               ; preds = %.lr.ph, %36
  %.sroa.46.0.copyload.peel57 = phi ptr [ %.sroa.46.0.copyload.peel51, %36 ], [ %.sroa.46.0.copyload.peel, %.lr.ph ]
  %.sroa.0.0.copyload.peel55 = phi i32 [ %.sroa.0.0.copyload.peel49, %36 ], [ %.sroa.0.0.copyload.peel, %.lr.ph ]
  %42 = phi ptr [ %37, %36 ], [ %34, %.lr.ph ]
  %.0344753 = phi i64 [ 1, %36 ], [ 0, %.lr.ph ]
  %43 = phi ptr [ %30, %36 ], [ %23, %.lr.ph ]
  %44 = phi ptr [ %31, %36 ], [ %24, %.lr.ph ]
  %45 = getelementptr inbounds i8, ptr %1, i64 32
  %46 = load ptr, ptr %45, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load i32, ptr %47, align 8, !tbaa !14
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %.0344753, %49
  br i1 %50, label %51, label %60

51:                                               ; preds = %41
  %52 = zext i32 %48 to i64
  %53 = icmp ult i64 %.0344753, %52
  br i1 %53, label %56, label %54

54:                                               ; preds = %51
  %55 = load ptr, ptr %42, align 8, !tbaa !16
  tail call void %55(i32 noundef -3) #2
  br label %56

56:                                               ; preds = %54, %51
  %57 = load ptr, ptr %46, align 8, !tbaa !21
  %58 = getelementptr inbounds ptr, ptr %57, i64 %.0344753
  %59 = load ptr, ptr %58, align 8, !tbaa !16
  br label %60

60:                                               ; preds = %56, %41
  %.035.peel = phi ptr [ %59, %56 ], [ null, %41 ]
  tail call void @CGenerator__genForeignArg__(ptr noundef %0, i32 %.sroa.0.0.copyload.peel55, ptr %.sroa.46.0.copyload.peel57, ptr noundef %.035.peel, i8 noundef zeroext 0, ptr noundef %5)
  %61 = load i32, ptr %44, align 8, !tbaa !19
  %62 = icmp sgt i32 %61, 1
  br i1 %62, label %.peel.next, label %._crit_edge

.peel.next:                                       ; preds = %60, %82
  %indvars.iv = phi i64 [ %indvars.iv.next, %82 ], [ 1, %60 ]
  %63 = load ptr, ptr %43, align 8, !tbaa !22
  %64 = getelementptr inbounds %struct.Node__, ptr %63, i64 %indvars.iv
  %.sroa.0.0.copyload = load i32, ptr %64, align 8, !tbaa !23
  %.sroa.46.0..sroa_idx = getelementptr inbounds i8, ptr %64, i64 8
  %.sroa.46.0.copyload = load ptr, ptr %.sroa.46.0..sroa_idx, align 8, !tbaa !16
  %65 = load ptr, ptr @mu_____string409, align 8
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string409, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %5, ptr %65, i32 %66)
  %67 = add nuw nsw i64 %indvars.iv, %.0344753
  %68 = load ptr, ptr %45, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  %70 = load i32, ptr %69, align 8, !tbaa !14
  %71 = sext i32 %70 to i64
  %72 = icmp slt i64 %67, %71
  br i1 %72, label %73, label %82

73:                                               ; preds = %.peel.next
  %74 = zext i32 %70 to i64
  %75 = icmp ult i64 %67, %74
  br i1 %75, label %78, label %76

76:                                               ; preds = %73
  %77 = load ptr, ptr %42, align 8, !tbaa !16
  tail call void %77(i32 noundef -3) #2
  br label %78

78:                                               ; preds = %76, %73
  %79 = load ptr, ptr %68, align 8, !tbaa !21
  %80 = getelementptr inbounds ptr, ptr %79, i64 %67
  %81 = load ptr, ptr %80, align 8, !tbaa !16
  br label %82

82:                                               ; preds = %.peel.next, %78
  %.035 = phi ptr [ %81, %78 ], [ null, %.peel.next ]
  tail call void @CGenerator__genForeignArg__(ptr noundef %0, i32 %.sroa.0.0.copyload, ptr %.sroa.46.0.copyload, ptr noundef %.035, i8 noundef zeroext 0, ptr noundef %5)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %83 = load i32, ptr %44, align 8, !tbaa !19
  %84 = sext i32 %83 to i64
  %85 = icmp slt i64 %indvars.iv.next, %84
  br i1 %85, label %.peel.next, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %82, %60, %.thread, %21
  %86 = load ptr, ptr @mu_____string303, align 8
  %87 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string303, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %5, ptr %86, i32 %87)
  ret void
}

; Function Attrs: nounwind uwtable
declare dso_local void @CGenerator__genForeignArg__(ptr noundef, i32, ptr, ptr noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #2 = { 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 32}
!6 = !{!"tag_____FunctionDef__", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !11, i64 104, !7, i64 112, !12, i64 120, !12, i64 136, !13, i64 152, !11, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !12, i64 208}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !7, i64 8}
!11 = !{!"int", !8, i64 0}
!12 = !{!"", !7, i64 0, !11, i64 8}
!13 = !{!"tag_____Tag__", !7, i64 0, !7, i64 8}
!14 = !{!15, !11, i64 8}
!15 = !{!"tag_____List__Ptr__Param______", !7, i64 0, !11, i64 8, !11, i64 12}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !7, i64 24}
!18 = !{!"tag_____CallExpression__", !10, i64 0, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!19 = !{!20, !11, i64 8}
!20 = !{!"tag_____List__Node____", !7, i64 0, !11, i64 8, !11, i64 12}
!21 = !{!15, !7, i64 0}
!22 = !{!20, !7, i64 0}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !25, !26}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!"llvm.loop.peeled.count", i32 1}


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